twenty/packages/twenty-ui/project.json
Pacifique LINJANJA 627a6bda29
Update twenty-front commands (#4667)
# This PR

- Moves dev and ci scripts to the `project.json` file in the
twenty-front package
- Adds a project.json file in the root of the project with the main
start command that start both twenty-server and twenty-front
applications concurrently
- Updates the script command of the root project with the start:prod
command (replacing the start command which will be used in dev with the
help of nx)
- Add a start:prod command in the twenty-front app, replacing the start
command (now used for dev purpose)

Issue ref #4645 

@charlesBochet @FelixMalfait please let me know how can I improve it

---------

Co-authored-by: Thaïs Guigon <guigon.thais@gmail.com>
2024-04-17 18:06:02 +02:00

89 lines
2.3 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": {
"command": "node {projectRoot}/scripts/generateBarrels.js"
}
},
"lint": {
"executor": "@nx/eslint:lint",
"options": {
"eslintConfig": "{projectRoot}/.eslintrc.cjs",
"ignorePath": "{workspaceRoot}/.gitignore",
"lintFilePatterns": [
"{projectRoot}/src/**/*.{ts,tsx,json}",
"{projectRoot}/package.json"
],
"cache": true
},
"configurations": {
"fix": { "fix": true }
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{projectRoot}/coverage"],
"options": {
"jestConfig": "{projectRoot}/jest.config.ts"
}
},
"typecheck": {
"executor": "nx:run-commands",
"options": {
"cwd": "{projectRoot}",
"command": "tsc -b tsconfig.json",
"incremental": true
},
"configurations": {
"ci": { "incremental": false },
"watch": { "watch": true }
}
},
"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": []
}