mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-06 07:26:43 -04:00
7454329a08
# 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/core` → `angular`). 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
10 lines
217 B
JSON
10 lines
217 B
JSON
{
|
|
"description": "A basic C# client and server template with only stubs for code",
|
|
"client_lang": "csharp",
|
|
"server_lang": "csharp",
|
|
"builtWith": [
|
|
"SpacetimeDB.ClientSDK",
|
|
"SpacetimeDB.Runtime"
|
|
]
|
|
}
|