Start · docs/guides/local-development.md
Local development
Requirements
Node 20 or later. Nothing else: no Python, no Homebrew packages, no native build tools. The native image renderer used for PNGs and QA sheets ships a prebuilt binary for each platform, and all of them are recorded in the lockfile.
On macOS with nvm: nvm install 22 && nvm use (the repository has an .nvmrc).
Commands
| Command | Does |
|---|---|
make setup |
npm ci: installs exactly what the lockfile pins |
make dev |
builds, then rebuilds on every change to src/, docs/ or public/ and serves the site at http://localhost:4173 |
make build |
regenerates build/, generated docs, the design kit, the site and index.html |
make validate |
every check, in the Station order (see architecture) |
make test |
unit tests only |
make lint |
icon sources only |
make qa |
QA sheets in qa/ (not tracked) |
make site / make site-serve |
rebuild the site / serve public/ at http://localhost:4173 |
make up / make down |
serve public/ from a container at http://localhost:8080 (needs Docker) |
make e2e |
browser checks (downloads Chromium for Playwright on first run) |
make shots |
retakes docs/screenshot.png |
make dist |
dist/cardsite-icons-<version>.zip and its .sha256, from tracked files |
When something fails
| Message | Fix |
|---|---|
generated files out of date |
Run make build and commit the result with your source change. |
lockfile is missing … binary |
Don't regenerate the lockfile. Run npm install <pkg>@<pinned version> so npm adds the missing entries. |
raw value in site.css |
Use a token from public/design/tokens.css. If none fits, add a role to public/design/overrides.json. |
executable doesn't exist from Playwright |
npx playwright install chromium (part of make e2e). |