From adc6e96f3fe3662740f8f5e478f40b1c43e494f4 Mon Sep 17 00:00:00 2001 From: "Rahul R." Date: Sun, 22 Dec 2024 15:17:43 +0530 Subject: [PATCH] chore(ui-core): fix target dependencies and optimize build process --- package.json | 6 +++--- packages/ui-config/project.json | 10 ++-------- packages/ui-core/project.json | 14 ++++++++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 23ce19e1c0a..cabe59fc3fd 100644 --- a/package.json +++ b/package.json @@ -123,9 +123,9 @@ "build:package:ui-config": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 && yarn nx build ui-config --configuration=development", "build:package:ui-config:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=12288 yarn nx build ui-config --configuration=production", "build:package:ui-config:docker": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=60000 yarn nx build ui-config --configuration=production", - "build:package:ui-core": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 yarn build:package:ui-config && yarn nx build ui-core --configuration=development", - "build:package:ui-core:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=12288 yarn build:package:ui-config:prod && yarn nx build ui-core --configuration=production", - "build:package:ui-core:docker": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=60000 yarn build:package:ui-config:docker && yarn nx build ui-core --configuration=production", + "build:package:ui-core": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 yarn nx build ui-core --configuration=development", + "build:package:ui-core:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=12288 yarn nx build ui-core --configuration=production", + "build:package:ui-core:docker": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=60000 yarn nx build ui-core --configuration=production", "build:package:auth": "cross-env NODE_ENV=development NODE_OPTIONS=--max-old-space-size=12288 yarn nx build auth --configuration=development", "build:package:auth:prod": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=12288 yarn nx build auth --configuration=production", "build:package:auth:docker": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=60000 yarn nx build auth --configuration=production", diff --git a/packages/ui-config/project.json b/packages/ui-config/project.json index c6eaa5c9e84..1cc8bf17d74 100644 --- a/packages/ui-config/project.json +++ b/packages/ui-config/project.json @@ -31,9 +31,6 @@ }, "generate-env": { "executor": "nx:run-commands", - "options": { - "cwd": "." - }, "configurations": { "production": { "commands": ["yarn run config:prod"] @@ -52,15 +49,12 @@ "projects": "self" } ], - "options": { - "cwd": "." - }, "configurations": { "production": { - "command": "cross-env NODE_ENV=production yarn ts-node packages/ui-config/scripts/replace-env-files.ts --environment=prod" + "command": "cross-env NODE_ENV=production yarn ts-node packages/ui-config/scripts/replace-env-files.ts" }, "development": { - "command": "cross-env NODE_ENV=development yarn ts-node packages/ui-config/scripts/replace-env-files.ts --environment=dev" + "command": "cross-env NODE_ENV=development yarn ts-node packages/ui-config/scripts/replace-env-files.ts" } }, "defaultConfiguration": "production" diff --git a/packages/ui-core/project.json b/packages/ui-core/project.json index e7c42b98915..21e03470159 100644 --- a/packages/ui-core/project.json +++ b/packages/ui-core/project.json @@ -10,6 +10,13 @@ "build": { "executor": "@nx/angular:package", "outputs": ["{workspaceRoot}/dist/{projectRoot}"], + "dependsOn": [ + "^build", + { + "target": "config", + "projects": "self" + } + ], "options": { "project": "packages/ui-core/ng-package.json", "tsConfig": "packages/ui-core/tsconfig.json" @@ -22,17 +29,16 @@ "tsConfig": "packages/ui-core/tsconfig.lib.json" } }, - "defaultConfiguration": "production", - "dependsOn": ["^build", "config"] + "defaultConfiguration": "production" }, "config": { "executor": "nx:run-commands", "configurations": { "production": { - "commands": ["yarn ts-node .scripts/configure.ts --prod"] + "commands": ["yarn nx build ui-config --configuration=production"] }, "development": { - "commands": ["yarn ts-node .scripts/configure.ts --dev"] + "commands": ["yarn nx build ui-config --configuration=development"] } }, "defaultConfiguration": "production"