Просмотр исходного кода

fix(docs): Generate dates file before running MDX tests

The test:mdx script imports manifest.ts which requires
dates.generated.ts, but this file is gitignored and only
generated during prebuild. This caused CI publish to fail
since prepublishOnly runs test:mdx before build.

Adding pretest:mdx hook ensures the dates file exists before
MDX validation runs.
David Höck 1 день назад
Родитель
Сommit
478068daa5
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      docs/package.json

+ 1 - 0
docs/package.json

@@ -24,6 +24,7 @@
         "prepublishOnly": "npm run test:mdx && npm run build",
         "publish:local": "npm version 0.0.0-$(date +%Y%m%d%H%M) --no-git-tag-version && npm publish --tag latest",
         "publish:local:next": "npm version 0.0.0-$(date +%Y%m%d%H%M) --no-git-tag-version && npm publish --tag next",
+        "pretest:mdx": "npm run generate-dates",
         "test:mdx": "tsx scripts/test-mdx.ts",
         "test:mdx:verbose": "tsx scripts/test-mdx.ts --verbose",
         "typecheck": "tsc --noEmit"