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
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
|
@ -56,6 +56,12 @@ jobs:
|
|||
npm run generate:schemas
|
||||
git diff --exit-code src/generated/ || (echo "Generated schemas are out of date. Run 'npm run generate:schemas' and commit." && exit 1)
|
||||
|
||||
- name: Verify synced snippets are up-to-date
|
||||
shell: bash
|
||||
run: |
|
||||
npm run sync:snippets
|
||||
git diff --exit-code src/ docs/ || (echo "Synced snippets are out of date. Run 'npm run sync:snippets' and commit." && exit 1)
|
||||
|
||||
- run: npm test
|
||||
|
||||
- run: npm run prettier
|
||||
|
|
|
|||
Loading…
Reference in a new issue