README: generate shortcuts table from shortcuts.ts (single source of truth)
The shortcuts table in README was hand-maintained and kept drifting from src/lib/shortcuts.ts (the data the in-app help overlay reads). Replace the table with a marker block (<!-- SHORTCUTS:START --> ... <!-- SHORTCUTS:END -->) populated by scripts/gen-readme-shortcuts.mjs. Includes TIPS too, not just shortcuts. Script is plain Node + fs (no tsx/esbuild dep); reads shortcuts.ts as text, strips TS type syntax, dynamic-imports the resulting .mjs. Adds `pnpm gen:readme` script and a `--check` mode that exits 1 on drift (for future CI wiring). Idempotent.
This commit is contained in:
parent
f51033a142
commit
25aac634ab
4 changed files with 244 additions and 11 deletions
|
|
@ -10,6 +10,7 @@
|
|||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"check": "tsc --noEmit",
|
||||
"gen:readme": "node scripts/gen-readme-shortcuts.mjs",
|
||||
"tauri": "tauri"
|
||||
},
|
||||
"dependencies": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue