Skip to content

Template README + template.json generation tool#4570

Open
bradleyshep wants to merge 13 commits intomasterfrom
bradley/template-readmes
Open

Template README + template.json generation tool#4570
bradleyshep wants to merge 13 commits intomasterfrom
bradley/template-readmes

Conversation

@bradleyshep
Copy link
Contributor

@bradleyshep bradleyshep commented Mar 5, 2026

Description of Changes

Adds tools/templates/ scripts to derive template metadata from manifests and generate READMEs from quickstart docs. Replaces slug-based builtWith with manifest-derived data and hardcoded quickstart mappings with discovery from docs.

Manifest-based builtWith (update-template-jsons.ts)

  • Reads package.json, Cargo.toml, and .csproj to populate builtWith in .template.json.
  • Scoped npm packages normalize to scope (@angular/coreangular). Excludes @types/*. Adds nodejs only for nodejs-ts when @types/node is present.
  • Root manifests processed before subdirs; primary framework first (e.g. react before spacetimedb in react-ts). Dependencies reordered in package.json where needed.

Dynamic quickstart discovery (generate-template-readmes.ts)

  • Discovers template → quickstart by parsing --template X from files in docs/docs/00100-intro/00200-quickstarts/.
  • Optional quickstart override in .template.json; must resolve under quickstarts dir.
  • chat-react-ts has no quickstart; uses manual README.

New: tools/templates/ (update-template-jsons.ts, generate-template-readmes.ts, README, package.json, pnpm-lock). Modified: all templates/*/.template.json (added builtWith), new/generated templates/*/README.md.

API and ABI breaking changes

None.

Expected complexity level and risk

1 – Dev tooling only. No runtime or API changes. Scripts are isolated; failures only affect generated metadata and READMEs.

Testing

  • cd tools/templates && pnpm run generate completes without errors
  • Spot-check builtWith and generated READMEs for a few templates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant