From 0490e4c29f0c8ff993cb8d7b92b4fb636e6cb583 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Thu, 3 Aug 2023 19:13:44 +0200 Subject: [PATCH] Replace executor to @nx/angular:webpack-browser --- apps/client/project.json | 66 +++++++++++----------------------------- package.json | 4 +-- 2 files changed, 20 insertions(+), 50 deletions(-) diff --git a/apps/client/project.json b/apps/client/project.json index aef0078d7..536af231d 100644 --- a/apps/client/project.json +++ b/apps/client/project.json @@ -11,60 +11,30 @@ "prefix": "gf", "targets": { "build": { - "executor": "@angular-devkit/build-angular:browser", + "executor": "nx:run-commands", + "dependsOn": ["build-base"], "options": { + "commands": [ + { + "command": "cp -r apps/client/src/assets dist/apps/client" + }, + { + "command": "cp apps/client/src/assets/assetlinks.json dist/apps/client" + } + // TODO + ] + } + }, + "build-base": { + "executor": "@nx/angular:webpack-browser", + "options": { + "localize": true, "outputPath": "dist/apps/client", "index": "apps/client/src/index.html", "main": "apps/client/src/main.ts", "polyfills": "apps/client/src/polyfills.ts", "tsConfig": "apps/client/tsconfig.app.json", - "assets": [ - { - "glob": "assetlinks.json", - "input": "apps/client/src/assets", - "output": "{workspaceRoot}/dist/apps/client/.well-known" - }, - { - "glob": "CHANGELOG.md", - "input": "", - "output": "{workspaceRoot}/dist/apps/client/assets" - }, - { - "glob": "favicon.ico", - "input": "apps/client/src/assets", - "output": "{workspaceRoot}/dist/apps/client/" - }, - { - "glob": "LICENSE", - "input": "", - "output": "{workspaceRoot}/dist/apps/client/assets" - }, - { - "glob": "robots.txt", - "input": "apps/client/src/assets", - "output": "{workspaceRoot}/dist/apps/client/" - }, - { - "glob": "site.webmanifest", - "input": "apps/client/src/assets", - "output": "{workspaceRoot}/dist/apps/client/" - }, - { - "glob": "**/*", - "input": "node_modules/ionicons/dist/ionicons", - "output": "{workspaceRoot}/dist/apps/client/ionicons" - }, - { - "glob": "**/*.js", - "input": "node_modules/ionicons/dist/", - "output": "{workspaceRoot}/dist/apps/client/" - }, - { - "glob": "**/*", - "input": "apps/client/src/assets", - "output": "{workspaceRoot}/dist/apps/client/assets/" - } - ], + "assets": [], "styles": [ "apps/client/src/styles/theme.scss", "apps/client/src/styles.scss" diff --git a/package.json b/package.json index 0548e1d5c..d0b80a70c 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "affected:lint": "nx affected:lint", "affected:test": "nx affected:test", "angular": "node --max_old_space_size=32768 ./node_modules/@angular/cli/bin/ng", - "build:all": "nx run api:build:production && nx run client:build:production --localize && yarn replace-placeholders-in-build", - "build:dev": "nx run api:build && nx run client:build --localize && yarn replace-placeholders-in-build", + "build:all": "nx run api:build:production && nx run client:build:production && yarn replace-placeholders-in-build", + "build:dev": "nx run api:build && nx run client:build && yarn replace-placeholders-in-build", "build:storybook": "nx run ui:build-storybook", "database:format-schema": "prisma format", "database:generate-typings": "prisma generate",