Skip to content

Template README + template.json generation tool#4570

Merged
clockwork-labs-bot merged 14 commits intomasterfrom
bradley/template-readmes
Mar 20, 2026
Merged

Template README + template.json generation tool#4570
clockwork-labs-bot merged 14 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

Copy link
Contributor

@clockwork-tien clockwork-tien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@clockwork-labs-bot clockwork-labs-bot added this pull request to the merge queue Mar 20, 2026
Merged via the queue into master with commit 7454329 Mar 20, 2026
35 checks passed
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.

3 participants