Build the package first so the examples can import from ../dist.
pnpm buildRun line diff, chunking, and stats:
pnpm exec tsx examples/line-diff.tsRun character-level diff:
pnpm exec tsx examples/character-diff.tsRun a more detailed character diff report with grouped inserted and removed runs:
pnpm exec tsx examples/character-diff-report.tsThe older starter examples are still available:
pnpm exec tsx examples/hello.ts
pnpm exec tsx examples/string.tsThese render the React components to static HTML with react-dom/server.
Run DiffStats and DiffViewer:
pnpm exec tsx examples/react-diff-viewer.tsxRun DiffChars and DiffCharsRaw:
pnpm exec tsx examples/react-character-diff.tsx