mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-25 20:00:34 +03:00
6683ffb890
In this PR, I'm simplifying storybook setup: 1) Remove build --test configuration that prevent autodocs. We are not using autodocs at all (the dev experience is not good enough), so I have completely disabled it. 2) Clarify `serve` vs `test` vs `serve-and-test` configurations After this PR: - you can serve storybook in two modes: `npx nx run twenty-front:storybook:serve:dev` and `npx nx run twenty-front:storybook:serve:static` - you can run tests agains an already served storybook (this is useful in dev so you don't have to rebuild everytime to run tests): `npx nx run twenty-front:storybook:test` - you can conbine both: `npx nx run twenty-front:storybook:serve-and-test:static`
67 lines
1.5 KiB
JSON
67 lines
1.5 KiB
JSON
{
|
|
"name": "twenty-ui",
|
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
"sourceRoot": "packages/twenty-ui/src",
|
|
"projectType": "library",
|
|
"tags": ["scope:frontend"],
|
|
"targets": {
|
|
"build": {
|
|
"dependsOn": ["^build", "generateBarrels"]
|
|
},
|
|
"generateBarrels": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"inputs": ["production", "{projectRoot}/scripts/generateBarrels.js"],
|
|
"outputs": ["{projectRoot}/src/index.ts", "{projectRoot}/src/*/index.ts"],
|
|
"options": {
|
|
"command": "node {projectRoot}/scripts/generateBarrels.js"
|
|
}
|
|
},
|
|
"lint": {
|
|
"options": {
|
|
"lintFilePatterns": [
|
|
"{projectRoot}/src/**/*.{ts,tsx,json}",
|
|
"{projectRoot}/package.json"
|
|
]
|
|
},
|
|
"configurations": {
|
|
"fix": {}
|
|
}
|
|
},
|
|
"fmt": {
|
|
"options": {
|
|
"files": "src"
|
|
},
|
|
"configurations": {
|
|
"fix": {}
|
|
}
|
|
},
|
|
"test": {},
|
|
"typecheck": {},
|
|
"storybook:build": {
|
|
"configurations": {
|
|
"test": {}
|
|
}
|
|
},
|
|
"storybook:serve:dev": {
|
|
"options": { "port": 6007 }
|
|
},
|
|
"storybook:serve:static": {
|
|
"options": {
|
|
"buildTarget": "twenty-ui:storybook:build",
|
|
"port": 6007
|
|
},
|
|
"configurations": {
|
|
"test": {}
|
|
}
|
|
},
|
|
"storybook:coverage": {},
|
|
"storybook:test": {
|
|
"options": { "port": 6007 }
|
|
},
|
|
"storybook:serve-and-test:static": {
|
|
"options": { "port": 6007 }
|
|
}
|
|
}
|
|
}
|