|
17 | 17 | }, |
18 | 18 | "targets": { |
19 | 19 | "build": { |
20 | | - "executor": "@nx/angular:webpack-browser", |
21 | | - "outputs": ["{options.outputPath}"], |
| 20 | + "executor": "nx:run-commands", |
22 | 21 | "options": { |
23 | | - "outputPath": "web/dist/web", |
24 | | - "index": "web/src/index.html", |
25 | | - "main": "web/src/main.ts", |
26 | | - "i18nMissingTranslation": "error", |
27 | | - "polyfills": ["zone.js"], |
28 | | - "tsConfig": "web/tsconfig.app.json", |
29 | | - "aot": true, |
30 | | - "assets": [ |
31 | | - "web/src/favicon.ico", |
32 | | - "web/src/assets" |
33 | | - ], |
34 | | - "stylePreprocessorOptions": { |
35 | | - "includePaths": ["web/src/app/styles"] |
36 | | - }, |
37 | | - "styles": ["web/src/ground-theme.scss"], |
38 | | - "scripts": [] |
39 | | - }, |
40 | | - "configurations": { |
41 | | - "development": { |
42 | | - "fileReplacements": [ |
43 | | - { |
44 | | - "replace": "web/src/environments/environment.ts", |
45 | | - "with": "web/src/environments/environment.local.ts" |
46 | | - } |
47 | | - ], |
48 | | - "buildOptimizer": false, |
49 | | - "optimization": false, |
50 | | - "vendorChunk": true, |
51 | | - "extractLicenses": false, |
52 | | - "sourceMap": true, |
53 | | - "namedChunks": true |
54 | | - }, |
55 | | - "staging": { |
56 | | - "fileReplacements": [ |
57 | | - { |
58 | | - "replace": "web/src/environments/environment.ts", |
59 | | - "with": "web/src/environments/environment.staging.ts" |
60 | | - } |
61 | | - ], |
62 | | - "buildOptimizer": false, |
63 | | - "localize": true, |
64 | | - "optimization": false, |
65 | | - "vendorChunk": true, |
66 | | - "extractLicenses": false, |
67 | | - "sourceMap": true, |
68 | | - "namedChunks": true |
69 | | - }, |
70 | | - "production": { |
71 | | - "fileReplacements": [ |
72 | | - { |
73 | | - "replace": "web/src/environments/environment.ts", |
74 | | - "with": "web/src/environments/environment.production.ts" |
75 | | - } |
76 | | - ], |
77 | | - "localize": true, |
78 | | - "optimization": true, |
79 | | - "outputHashing": "all", |
80 | | - "sourceMap": false, |
81 | | - "namedChunks": false, |
82 | | - "aot": true, |
83 | | - "extractLicenses": true, |
84 | | - "vendorChunk": false, |
85 | | - "buildOptimizer": true, |
86 | | - "budgets": [ |
87 | | - { |
88 | | - "type": "initial", |
89 | | - "maximumWarning": "3mb", |
90 | | - "maximumError": "5mb" |
91 | | - }, |
92 | | - { |
93 | | - "type": "anyComponentStyle", |
94 | | - "maximumWarning": "100kb", |
95 | | - "maximumError": "200kb" |
96 | | - } |
97 | | - ] |
98 | | - }, |
99 | | - "en": { |
100 | | - "localize": ["en"] |
101 | | - }, |
102 | | - "fr": { |
103 | | - "localize": ["fr"] |
104 | | - }, |
105 | | - "vi": { |
106 | | - "localize": ["vi"] |
107 | | - } |
108 | | - }, |
109 | | - "defaultConfiguration": "development" |
| 22 | + "cwd": "web", |
| 23 | + "command": "npx ng build", |
| 24 | + "forwardAllArgs": true |
| 25 | + } |
110 | 26 | }, |
111 | 27 | "serve": { |
112 | | - "executor": "@nx/angular:dev-server", |
| 28 | + "executor": "nx:run-commands", |
113 | 29 | "options": { |
114 | | - "buildTarget": "web:build" |
115 | | - }, |
116 | | - "dependsOn": [ |
117 | | - "^build" |
118 | | - ], |
119 | | - "configurations": { |
120 | | - "development": { |
121 | | - "buildTarget": "web:build:development,en" |
122 | | - }, |
123 | | - "staging": { |
124 | | - "buildTarget": "web:build:staging,en" |
125 | | - }, |
126 | | - "production": { |
127 | | - "buildTarget": "web:build:production,en" |
128 | | - }, |
129 | | - "fr": { |
130 | | - "buildTarget": "web:build:staging,fr" |
131 | | - }, |
132 | | - "vi": { |
133 | | - "buildTarget": "web:build:staging,vi" |
134 | | - } |
| 30 | + "cwd": "web", |
| 31 | + "command": "npx ng serve", |
| 32 | + "forwardAllArgs": true |
135 | 33 | } |
136 | 34 | }, |
137 | | - "extract-i18n": { |
138 | | - "executor": "@nx/angular:extract-i18n", |
| 35 | + "test": { |
| 36 | + "executor": "nx:run-commands", |
139 | 37 | "options": { |
140 | | - "buildTarget": "web:build", |
141 | | - "format": "json", |
142 | | - "outputPath": "web/src/locale" |
| 38 | + "cwd": "web", |
| 39 | + "command": "npx ng test", |
| 40 | + "forwardAllArgs": true |
143 | 41 | } |
144 | 42 | }, |
145 | | - "test": { |
146 | | - "executor": "@angular-devkit/build-angular:karma", |
147 | | - "dependsOn": ["build", "pretest"], |
| 43 | + "lint": { |
| 44 | + "executor": "nx:run-commands", |
148 | 45 | "options": { |
149 | | - "main": "web/src/test.ts", |
150 | | - "polyfills": ["zone.js"], |
151 | | - "tsConfig": "web/tsconfig.spec.json", |
152 | | - "fileReplacements": [ |
153 | | - { |
154 | | - "replace": "web/src/environments/environment.ts", |
155 | | - "with": "web/src/environments/environment.test.ts" |
156 | | - } |
157 | | - ], |
158 | | - "karmaConfig": "web/karma.conf.js", |
159 | | - "assets": [ |
160 | | - "web/src/favicon.ico", |
161 | | - "web/src/assets" |
162 | | - ], |
163 | | - "stylePreprocessorOptions": { |
164 | | - "includePaths": ["web/src/app/styles"] |
165 | | - }, |
166 | | - "styles": ["web/src/ground-theme.scss"], |
167 | | - "scripts": [], |
168 | | - "codeCoverage": true |
| 46 | + "cwd": "web", |
| 47 | + "command": "npx ng lint", |
| 48 | + "forwardAllArgs": true |
169 | 49 | } |
170 | 50 | }, |
171 | | - "lint": { |
172 | | - "executor": "@nx/eslint:lint", |
| 51 | + "extract-i18n": { |
| 52 | + "executor": "nx:run-commands", |
173 | 53 | "options": { |
174 | | - "lintFilePatterns": [ |
175 | | - "web/**/*.ts", |
176 | | - "web/**/*.html" |
177 | | - ] |
| 54 | + "cwd": "web", |
| 55 | + "command": "npx ng extract-i18n", |
| 56 | + "forwardAllArgs": true |
178 | 57 | } |
179 | 58 | }, |
180 | 59 | "deploy": { |
181 | | - "executor": "@angular/fire:deploy", |
| 60 | + "executor": "nx:run-commands", |
182 | 61 | "options": { |
183 | | - "buildTarget": "web:build" |
| 62 | + "cwd": "web", |
| 63 | + "command": "npx ng deploy", |
| 64 | + "forwardAllArgs": true |
184 | 65 | } |
185 | 66 | } |
186 | 67 | } |
|
0 commit comments