Replace {@includeCode} with synced code fences
Migrate JSDoc and markdown documentation from `{@includeCode ./file#region}`
tags to inline code fences with `source="./file#region"` attributes.
Code examples are now visible directly in source files while remaining
type-checked via their `.examples.ts` source files.
Add `scripts/sync-snippets.ts` to extract code from `//#region` blocks
and sync it into labeled fences. Run with `npm run sync:snippets`.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
ac65f46026
commit
58019a48ce
1 changed files with 1776 additions and 96 deletions
|
|
@ -47,7 +47,8 @@
|
|||
"postinstall": "node scripts/setup-bun.mjs || echo 'setup-bun.mjs failed or not available'",
|
||||
"start": "npm run examples:dev",
|
||||
"generate:schemas": "tsx scripts/generate-schemas.ts && prettier --write \"src/generated/**/*\"",
|
||||
"build": "npm run generate:schemas && node scripts/run-bun.mjs build.bun.ts",
|
||||
"sync:snippets": "bun scripts/sync-snippets.ts",
|
||||
"build": "npm run generate:schemas && npm run sync:snippets && node scripts/run-bun.mjs build.bun.ts",
|
||||
"prepack": "npm run build",
|
||||
"build:all": "npm run examples:build",
|
||||
"test": "bun test src",
|
||||
|
|
|
|||
Loading…
Reference in a new issue