Fix storybook build & run it in CI as dry-run (#32488)

* feat: add dry run of storybook build in merge queue

* Reuse build from storybook build job

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Use nx to build library before building storybook

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Florian Duros
2026-02-17 10:41:11 +00:00
committed by GitHub
co-authored by Michael Telatynski
parent 8a85efcfd6
commit 33af62965a
5 changed files with 70 additions and 22 deletions
+2 -2
View File
@@ -44,8 +44,8 @@
"build": "nx build",
"prepack": "pnpm run build",
"storybook": "storybook dev -p 6007",
"build:storybook": "pnpm build:doc && storybook build && node scripts/storybook-build-i18n.ts",
"build:doc": "typedoc",
"build:storybook": "nx run @element-hq/web-shared-components:storybook",
"build:doc": "nx run @element-hq/web-shared-components:typedoc",
"lint": "pnpm lint:types && pnpm lint:js",
"lint:js": "eslint --max-warnings 0 src && prettier --check .",
"lint:types": "tsc --noEmit && tsc --noEmit -p tsconfig.node.json"
+20 -1
View File
@@ -5,7 +5,7 @@
"build": {
"cache": true,
"command": "vite build",
"inputs": ["{projectRoot}/src/**/*"],
"inputs": ["src"],
"outputs": ["{projectRoot}/dist"],
"options": { "cwd": "packages/shared-components" }
},
@@ -13,6 +13,25 @@
"command": "vite build --watch",
"options": { "cwd": "packages/shared-components" },
"continuous": true
},
"typedoc": {
"cache": "true",
"command": "typedoc",
"inputs": ["src"],
"outputs": ["{projectRoot}/typedoc"],
"options": { "cwd": "packages/shared-components" }
},
"storybook": {
"cache": "true",
"inputs": ["src", "{projectRoot}/.storybook", "{projectRoot}/typedoc"],
"outputs": ["{projectRoot}/storybook-static"],
"executor": "nx:run-commands",
"options": {
"commands": ["storybook build", "node scripts/storybook-build-i18n.ts"],
"parallel": false,
"cwd": "packages/shared-components"
},
"dependsOn": ["build", "typedoc"]
}
}
}