Every `ts`-tagged fence in README.md / CONTRIBUTING.md now becomes an executed `node:test` case in a gitignored generated file, so a documented example cannot drift from the API. The generator hoists and merges the leading imports, rewrites the library specifier to the `#test-tiny-pattern-ts` alias, and rejects a fence with no describing paragraph or one that re-imports a prelude module. CI regenerates via `pretest:ci`; `create:doc-tests` runs the generator, formats, then typechecks the output against a scoped tsconfig that relaxes `noUnusedLocals`. c8's default excludes already omit the generated `*.test.ts`, so `test:ci` is unchanged.
20 lines
362 B
Plaintext
20 lines
362 B
Plaintext
node_modules
|
|
dist
|
|
coverage
|
|
|
|
# Generated doc-tests (scripts/create-doc-tests.ts); the folder is kept via .gitkeep
|
|
src/doc-test/__generated__/*.test.ts
|
|
!src/doc-test/__generated__/.gitkeep
|
|
*.log
|
|
*.tsbuildinfo
|
|
*.local
|
|
|
|
# Editor directories and files
|
|
.vscode/*
|
|
!.vscode/extensions.json
|
|
!.vscode/settings.json
|
|
!.vscode/tasks.json
|
|
!.vscode/launch.json
|
|
.idea
|
|
.DS_Store
|