Skip to content

The open alternative to Salesforce, designed for AI.

perf: use Nx cache for Chromatic script (#5457)

Thaïs35c1f9751197
diff --git a/nx.json b/nx.json
index 9dabefb8401..40a7d1a3d77 100644
--- a/nx.json
+++ b/nx.json
@@ -218,8 +218,14 @@
"executor": "nx:run-commands",
"options": {
"cwd": "{projectRoot}",
- "command": "cross-var chromatic --project-token=$CHROMATIC_PROJECT_TOKEN --build-script-name={args.targetPackageJsonScript} {args.ci}",
- "targetPackageJsonScript": "storybook:build:chromatic"
+ "commands": [
+ {
+ "command": "nx storybook:build {projectName} --configuration=test",
+ "forwardAllArgs": false
+ },
+ "cross-var chromatic --project-token=$CHROMATIC_PROJECT_TOKEN --storybook-build-dir=storybook-static {args.ci}"
+ ],
+ "parallel": false
},
"configurations": {
"ci": {
diff --git a/packages/twenty-front/package.json b/packages/twenty-front/package.json
index 7d7e2f2e0c4..4e0aef8f483 100644
--- a/packages/twenty-front/package.json
+++ b/packages/twenty-front/package.json
@@ -6,7 +6,6 @@
"scripts": {
"build": "npx vite build && sh ./scripts/inject-runtime-env.sh",
"build:sourcemaps": "VITE_BUILD_SOURCEMAP=true NODE_OPTIONS=--max-old-space-size=4096 npx nx build",
- "storybook:build:chromatic": "nx storybook:build --configuration=test",
"start:prod": "NODE_ENV=production npx vite --host",
"tsup": "npx tsup"
},