Development
Local commands and verification flow for @memoir/tree.
This project uses Bun, TypeScript, oxlint, and Bun's test runner.
Commands
bun run lint
bun run typecheck
bun test
bun run build
bun run checkbun run check is the full local quality gate:
oxlint .tsc --noEmitbun testbun run build
Build
The build intentionally avoids tsup and esbuild.
rm -rf dist
tsc -p tsconfig.build.json
bun scripts/fix-dist-imports.tsTypeScript emits ESM and declarations. The Bun script rewrites local generated ESM imports to include .js extensions so dist/index.js works in Node-style ESM environments.
Source Layout
Published source lives under src/. Tests live under tests/. The Next.js and Fumadocs site lives under site/.
See Project Structure for the full tree.
Tests
Tests are focused on pure behavior:
- Relationship helper rows.
- Subject-centered family indexing.
- Measured layout derivation.
- Relationship graph traversal.
- Relationship chart level building.
Linting
Oxlint is the only linter. Keep bun run lint at zero warnings.
Browser Verification
After layout or rendering changes:
- Run the docs site with
bun run devfromsite/. - Open
http://localhost:3000. - Inspect the console.
- Capture a screenshot of the family tree playground section.