Make a focused change
This page is for working on the repository: locating the active implementation, changing the right layer, and keeping examples aligned with the public package.
Start at the published entry
The package metadata points to src/index.js. That file re-exports src/v12/index.js, which is the current public implementation described here.
Other version folders are present in the repository, but they are not the target of this v12 guide.
Find the right place to edit
| Change | Start here |
|---|---|
| Change table assembly or defaults | src/v12/tableFromData/index.js |
| Change repeated header generation | src/v12/collectionFromKey/index.js |
| Change row and cell generation | src/v12/collectionFromInternal/index.js |
| Change template substitution or traversal | src/v12/applyTemplate |
| Change which symbols consumers can import | src/v12/index.js and src/index.js |
| Change package scripts or published files | package.json |
Make and review a change
- Identify the public behavior that should change and trace it from
src/index.jsinto the relevant v12 module. - Keep a code change in the smallest responsible module. Update an example when it teaches or exercises that behavior.
- For sample composition, keep input data, reusable templates, table scaffold, and instructions in separate JSON files. Sample JavaScript connects those pieces.
- Update the public README or the focused documentation page when the input contract, output, or supported behavior changes.
The sample instruction filename currently appears as instuctions.json (without the second “r”). Existing imports use that spelling.
Local commands
Install the package dependencies, then use the scripts defined by the project:
npm install
npm run dev
npm run buildnpm run dev starts the Vite development server. npm run build runs the Vite production build. The current package.json does not define a test script.
Where examples live
The v12 examples are under samples/tableTypes/v12. Each top-level folder explores a different composition approach; the html case adds a browser rendering step. Treat these as sample code and inspect their current instructions before using one as a behavioral guarantee.