Skip to content

Commit 456f393

Browse files
committed
chore: move api-whitelist generation to postinstall
Fixes knip/lint failing because generated file doesn't exist. The file must exist before any tool loads vite.config.ts.
1 parent 04ef2be commit 456f393

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

apps/docs/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"type": "module",
66
"scripts": {
77
"dev": "vite --port 8000",
8-
"prebuild": "tsx build/generate-api-whitelist.ts",
98
"build": "vite-ssg build",
109
"preview": "vite preview"
1110
},

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"release:patch": "bumpp patch -r",
4242
"release:minor": "bumpp minor -r",
4343
"release:major": "bumpp major -r",
44+
"postinstall": "tsx apps/docs/build/generate-api-whitelist.ts",
4445
"prepare": "simple-git-hooks"
4546
},
4647
"simple-git-hooks": {
@@ -63,6 +64,7 @@
6364
"knip": "catalog:",
6465
"sherif": "catalog:",
6566
"simple-git-hooks": "catalog:",
67+
"tsx": "catalog:",
6668
"typescript": "catalog:",
6769
"vitest": "catalog:",
6870
"vue-tsc": "catalog:"

pnpm-lock.yaml

Lines changed: 5 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ catalog:
3030
eslint-plugin-storybook: ^10.1.11
3131
eslint-plugin-vuejs-accessibility: ^2.4.1
3232
fflate: ^0.8.2
33+
flagsmith: ^10.0.0
3334
happy-dom: ^20.1.0
3435
knip: ^5.80.0
35-
flagsmith: ^10.0.0
3636
launchdarkly-js-client-sdk: ^3.9.0
3737
markdown-it-anchor: ^9.2.0
3838
markdown-it-attrs: ^4.3.1
@@ -54,7 +54,7 @@ catalog:
5454
swetrix: ^3.7.2
5555
ts-morph: 27.0.2
5656
tsdown: ^0.16.8
57-
tsx: ^4.21.0
57+
tsx: 4.21.0
5858
typescript: 5.9.3
5959
unocss: ^66.5.10
6060
unplugin-auto-import: ^20.2.0

0 commit comments

Comments
 (0)