twenty/packages/twenty-ui/project.json
Thaïs eef1211463
chore: include react components in twenty-ui test config (#4709)
Split from https://github.com/twentyhq/twenty/pull/4518

Part of https://github.com/twentyhq/twenty/issues/4766

- Re-generates some of the twenty-ui test and storybook config with Nx
- Includes tsx files in twenty-ui tests and compiles them with swc

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 12:30:49 +02:00

78 lines
2.1 KiB
JSON

{
"name": "twenty-ui",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/twenty-ui/src",
"projectType": "library",
"targets": {
"build": {
"dependsOn": ["^build", "generateBarrels"]
},
"generateBarrels": {
"executor": "nx:run-commands",
"cache": true,
"inputs": [
"{projectRoot}/src/**/*.{ts,tsx}",
"!{projectRoot}/src/**/*.(spec|test).{ts,tsx}",
"!{projectRoot}/src/**/*.stories.{ts,tsx}"
],
"outputs": ["{projectRoot}/src/index.ts", "{projectRoot}/src/*/index.ts"],
"options": {
"outputPath": "{projectRoot}/dist",
"command": "npx ts-node --esm {projectRoot}/scripts/generateBarrels.ts"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"options": {
"eslintConfig": "{projectRoot}/.eslintrc.cjs",
"ignorePath": "{workspaceRoot}/.gitignore",
"lintFilePatterns": [
"{projectRoot}/src/**/*.{ts,tsx,json}",
"{projectRoot}/package.json"
]
},
"configurations": {
"ci": { "lintFilePatterns": ["{projectRoot}/**/*.{ts,tsx,json}"] },
"fix": { "fix": true }
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{projectRoot}/coverage"],
"options": {
"jestConfig": "{projectRoot}/jest.config.ts"
}
},
"storybook:dev": {
"executor": "@nx/storybook:storybook",
"options": {
"port": 6007,
"configDir": "{projectRoot}/.storybook"
},
"configurations": {
"ci": { "quiet": true }
}
},
"storybook:build": {
"executor": "@nx/storybook:build",
"outputs": ["{options.outputDir}"],
"options": {
"outputDir": "{projectRoot}/storybook-static",
"configDir": "{projectRoot}/.storybook"
},
"configurations": {
"ci": {
"quiet": true
}
}
},
"storybook:test": {
"executor": "nx:run-commands",
"options": {
"command": "test-storybook -c {projectRoot}/.storybook --url=http://localhost:6007"
}
}
},
"tags": []
}