Contributor guide · repository workflow

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

ChangeStart here
Change table assembly or defaultssrc/v12/tableFromData/index.js
Change repeated header generationsrc/v12/collectionFromKey/index.js
Change row and cell generationsrc/v12/collectionFromInternal/index.js
Change template substitution or traversalsrc/v12/applyTemplate
Change which symbols consumers can importsrc/v12/index.js and src/index.js
Change package scripts or published filespackage.json

Make and review a change

  1. Identify the public behavior that should change and trace it from src/index.js into the relevant v12 module.
  2. Keep a code change in the smallest responsible module. Update an example when it teaches or exercises that behavior.
  3. For sample composition, keep input data, reusable templates, table scaffold, and instructions in separate JSON files. Sample JavaScript connects those pieces.
  4. 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 build

npm 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.