Commit 41df112
committed
fix(docs): make link-check a cached task that depends on gen:docs
The docs link-check previously ran as a package.json script:
vp run -w gen && node validate-links.mjs
Script caching (cache.scripts) only caches stdout; it does not archive
or restore files produced by a script. The generated example pages live
under docs/content/examples/** (written by the dev-scripts gen:docs
task), so on a cache-replay of the gen script those files were not
restored, and validate-links raced ahead reading a stale/empty
content/examples dir -> '13 errors / not-found' for every /examples link.
Define docs#test as a Vite Task that dependsOn @blocknote/dev-scripts#gen:docs
instead. Task output archiving restores docs/content/examples/** on a
cache hit, and the task graph guarantees gen:docs fully completes before
validation runs. Verified locally: deleting the generated dirs and
re-running 'vp run test' restores the files on cache hit and reports
'0 errored file, 0 errors'.1 parent 8010e65 commit 41df112
2 files changed
Lines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
| 15 | + | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments