Skip to content
Generated folders

Generated folders

shared/ is the one place edited by hand. Everything tools/sync-shared.mjs copies out of it, and everything any other tools/*/build.mjs script writes, is generated output: editing the copy appears to work and then vanishes at the next sync or build, with no warning. Edit the source it names instead.

Recognising a generated file

  • GENERATED by <tool> from <source> — edit the source, not this copy. — every file in the ten mirrors below (tools/sync-shared.mjs:94), plus the icon sprite (GENERATED by tools/icons/build.mjs) and the brand assets (GENERATED by tools/brand/build.mjs).
  • GENERATED-SOURCE: written by <tool> — used where a tool computes the whole file rather than copying it, for example shared/tokens/fonts.css's GENERATED-SOURCE: written by tools/fonts/build.mjs.
  • GENERATED by `tools/emails/build.mjs` (with backticks) — the first lines of emails/README.md.
  • GENERATED.json — one manifest per mirror, listing every file it wrote, its source and a hash, so a diff shows exactly what changed.
  • tools/starter/.generated/<name>.json — the same idea for a starter: which edition file backs each overlay's pin.

None of these mean "do not read" — they mean "do not edit here". The file you want is named on the same line. shared/tokens/index.css, for instance, begins GENERATED-SOURCE: edit in shared/tokens/, never in an edition — that header marks the hand-edited source itself, not a copy of it.

The ten mirrors

PackageMirrorMarkerIn a standalone folder
htmlhtml/sharedGENERATED.json; header GENERATED by tools/sync-shared.mjs from …Yours to edit
reactreact/src/sharedGENERATED.json; header GENERATED by tools/sync-shared.mjs from …Yours to edit
nextjsnextjs/src/sharedGENERATED.json; header GENERATED by tools/sync-shared.mjs from …Yours to edit
vuevue/src/sharedGENERATED.json; header GENERATED by tools/sync-shared.mjs from …Yours to edit
nuxtnuxt/app/sharedGENERATED.json; header GENERATED by tools/sync-shared.mjs from …Yours to edit
starter-htmlstarters/html/sharedGENERATED.json; header GENERATED by tools/sync-shared.mjs from …Yours to edit
starter-reactstarters/react/src/sharedGENERATED.json; header GENERATED by tools/sync-shared.mjs from …Yours to edit
starter-nextjsstarters/nextjs/src/sharedGENERATED.json; header GENERATED by tools/sync-shared.mjs from …Yours to edit
starter-vuestarters/vue/src/sharedGENERATED.json; header GENERATED by tools/sync-shared.mjs from …Yours to edit
starter-nuxtstarters/nuxt/app/sharedGENERATED.json; header GENERATED by tools/sync-shared.mjs from …Yours to edit

Everything else that is generated

PathProduced byRegenerate withHow to recognise
html-dist/html/build.mjscd html && pnpm run buildbuild output next to the html/ folder
starters/html-dist/starters/html/build.mjscd starters/html && pnpm run buildbuild output next to the starter
html/assets/vendor/, starters/html/assets/vendor/html/vendor.mjscd html && pnpm run build (starters/html the same)third-party scripts fetched once by vendor.mjs, bundled in by bundle.mjs
dist/, .next/, .nuxt/, .output/the framework's buildpnpm run buildthe framework's own build output — Vite, Next.js or Nuxt, not an Orion script
docs-dist/tools/docs/build.mjsnode tools/docs/build.mjsthis site
shared/icons/sprite.svg, shared/icons/sprite.mjs, shared/icons/sprite.d.mts, shared/icons/sprite.inline.js, shared/icons/icons.csstools/icons/build.mjsnode tools/icons/build.mjsthe header comment
shared/brand/*tools/brand/build.mjsnode tools/brand/build.mjsthe header comment (the favicon PNGs are binary and carry none)
shared/fonts/, shared/tokens/fonts.csstools/fonts/build.mjsnode tools/fonts/build.mjsthe header comment on fonts.css (the font files themselves are binary)
shared/mock/*.json (12 fixtures), shared/mock/dataset.inline.jstools/mock-data/build.mjsnode tools/mock-data/build.mjsthe header comment on dataset.inline.js (the JSON fixtures carry none)
emails/tools/emails/build.mjsnode tools/emails/build.mjsthe header on emails/README.md
starters/ (each starter’s own pnpm-lock.yaml excepted)tools/starter/build.mjsnode tools/starter/build.mjs <name>the ledger, tools/starter/.generated/.json
tools/icons/icons.generated.jstools/icons/build.mjsnode tools/icons/build.mjsthe filename
tools/token-specimen/tokens.generated.jstools/token-specimen/build.mjsnode tools/token-specimen/build.mjsthe filename

Checking for drift

Full repository only
node tools/sync-shared.mjs
node tools/sync-shared.mjs --check

--check fails the moment a mirror has been hand-edited instead of its source in shared/, is missing, or contains a file with no source at all. Every edition and starter's build script — and dev, for the ones that have one — runs the sync in write mode first (pnpm run sync), which overwrites a hand-edited copy rather than catching it; pnpm run check, run separately, is what calls --check.