chore: add script to generate twenty-ui barrels before build (#4707)
Split from https://github.com/twentyhq/twenty/pull/4518 Part of #4766 Adds a script to auto-generate twenty-ui exports in `index.ts` files. --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -5,10 +5,19 @@
|
||||
"projectType": "library",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nx/vite:build",
|
||||
"outputs": ["{options.outputPath}"],
|
||||
"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": "packages/twenty-ui/dist"
|
||||
"command": "npx ts-node --esm {projectRoot}/scripts/generateBarrels.ts"
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
|
||||
Reference in New Issue
Block a user