[FIX] Nx project's scope build dependency management (#10010)
# Introduction Defined `dependsOn` for each nx project's configuration that has a dependency to another local package ( ui, shared ). As follows: ```json "dependsOn": ["^build"] ``` Where the `^` symbol means "all dependencies of this project" Now on a fresh repo, no built or install deps after install dependencies you can directly hit `npx nx build PROJECT_NAME` closes https://github.com/twentyhq/core-team-issues/issues/371 Related what was failing [run](https://github.com/twentyhq/twenty-infra/actions/runs/13141544809/job/36669643182) Cancelled before deploy, attested build was correct within the publish and digest
This commit is contained in:
@ -8,7 +8,8 @@
|
|||||||
"outputs": ["{options.outputPath}"],
|
"outputs": ["{options.outputPath}"],
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "{projectRoot}/dist"
|
"outputPath": "{projectRoot}/dist"
|
||||||
}
|
},
|
||||||
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"start": {
|
"start": {
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
|
|||||||
@ -26,9 +26,6 @@ COPY ./packages/twenty-emails /app/packages/twenty-emails
|
|||||||
COPY ./packages/twenty-shared /app/packages/twenty-shared
|
COPY ./packages/twenty-shared /app/packages/twenty-shared
|
||||||
COPY ./packages/twenty-server /app/packages/twenty-server
|
COPY ./packages/twenty-server /app/packages/twenty-server
|
||||||
|
|
||||||
RUN npx nx run twenty-shared:build
|
|
||||||
RUN npx nx run twenty-emails:build
|
|
||||||
|
|
||||||
RUN npx nx run twenty-server:build
|
RUN npx nx run twenty-server:build
|
||||||
RUN mv /app/packages/twenty-server/dist /app/packages/twenty-server/build
|
RUN mv /app/packages/twenty-server/dist /app/packages/twenty-server/build
|
||||||
RUN npx nx run twenty-server:build:packageJson
|
RUN npx nx run twenty-server:build:packageJson
|
||||||
|
|||||||
@ -9,6 +9,9 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "npx vite build"
|
"build": "npx vite build"
|
||||||
},
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"twenty-shared": "workspace:*"
|
||||||
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"import": "./dist/index.mjs",
|
"import": "./dist/index.mjs",
|
||||||
|
|||||||
@ -8,7 +8,8 @@
|
|||||||
"outputs": ["{options.outputPath}"],
|
"outputs": ["{options.outputPath}"],
|
||||||
"options": {
|
"options": {
|
||||||
"outputPath": "{projectRoot}/dist"
|
"outputPath": "{projectRoot}/dist"
|
||||||
}
|
},
|
||||||
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"typecheck": {},
|
"typecheck": {},
|
||||||
"lint": {
|
"lint": {
|
||||||
|
|||||||
@ -10,7 +10,8 @@
|
|||||||
"options": {
|
"options": {
|
||||||
"cwd": "packages/twenty-server",
|
"cwd": "packages/twenty-server",
|
||||||
"commands": ["rimraf dist", "nest build --path ./tsconfig.build.json"]
|
"commands": ["rimraf dist", "nest build --path ./tsconfig.build.json"]
|
||||||
}
|
},
|
||||||
|
"dependsOn": ["^build"]
|
||||||
},
|
},
|
||||||
"test:integration": {
|
"test:integration": {
|
||||||
"executor": "nx:run-commands",
|
"executor": "nx:run-commands",
|
||||||
|
|||||||
Reference in New Issue
Block a user