Skip to content

Commit 2f0fbfc

Browse files
committed
Restore angular.json, required for Firebase emu web frameworks integration
1 parent 5784dc3 commit 2f0fbfc

2 files changed

Lines changed: 187 additions & 150 deletions

File tree

web/angular.json

Lines changed: 159 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
{
2-
"$schema": "../node_modules/@angular/cli/lib/config/schema.json",
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"version": 1,
4+
"newProjectRoot": "projects",
45
"projects": {
56
"web": {
67
"projectType": "application",
8+
"schematics": {
9+
"@schematics/angular:component": {
10+
"style": "scss"
11+
}
12+
},
713
"root": ".",
814
"sourceRoot": "src",
915
"prefix": "ground",
1016
"i18n": {
11-
"sourceLocale": "en"
17+
"sourceLocale": "en",
18+
"locales": {
19+
"fr": {
20+
"translation": "src/locale/messages.fr.json"
21+
},
22+
"vi": {
23+
"translation": "src/locale/messages.vi.json"
24+
}
25+
}
1226
},
1327
"architect": {
1428
"build": {
@@ -21,6 +35,7 @@
2135
"zone.js"
2236
],
2337
"tsConfig": "tsconfig.app.json",
38+
"aot": true,
2439
"assets": [
2540
"src/favicon.ico",
2641
"src/assets"
@@ -33,7 +48,8 @@
3348
"includePaths": [
3449
"src/app/styles"
3550
]
36-
}
51+
},
52+
"i18nMissingTranslation": "error"
3753
},
3854
"configurations": {
3955
"development": {
@@ -49,10 +65,150 @@
4965
"with": "src/environments/environment.local.ts"
5066
}
5167
]
68+
},
69+
"staging": {
70+
"fileReplacements": [
71+
{
72+
"replace": "src/environments/environment.ts",
73+
"with": "src/environments/environment.staging.ts"
74+
}
75+
],
76+
"buildOptimizer": false,
77+
"localize": true,
78+
"optimization": false,
79+
"vendorChunk": true,
80+
"extractLicenses": false,
81+
"sourceMap": true,
82+
"namedChunks": true
83+
},
84+
"production": {
85+
"fileReplacements": [
86+
{
87+
"replace": "src/environments/environment.ts",
88+
"with": "src/environments/environment.production.ts"
89+
}
90+
],
91+
"localize": true,
92+
"optimization": true,
93+
"outputHashing": "all",
94+
"sourceMap": false,
95+
"namedChunks": false,
96+
"aot": true,
97+
"extractLicenses": true,
98+
"vendorChunk": false,
99+
"buildOptimizer": true,
100+
"budgets": [
101+
{
102+
"type": "initial",
103+
"maximumWarning": "3mb",
104+
"maximumError": "5mb"
105+
},
106+
{
107+
"type": "anyComponentStyle",
108+
"maximumWarning": "100kb",
109+
"maximumError": "200kb"
110+
}
111+
]
112+
},
113+
"en": {
114+
"localize": [
115+
"en"
116+
]
117+
},
118+
"fr": {
119+
"localize": [
120+
"fr"
121+
]
122+
},
123+
"vi": {
124+
"localize": [
125+
"vi"
126+
]
127+
}
128+
},
129+
"defaultConfiguration": "development"
130+
},
131+
"serve": {
132+
"builder": "@angular-devkit/build-angular:dev-server",
133+
"options": {
134+
"buildTarget": "web:build"
135+
},
136+
"configurations": {
137+
"development": {
138+
"buildTarget": "web:build:development,en"
139+
},
140+
"staging": {
141+
"buildTarget": "web:build:staging,en"
142+
},
143+
"production": {
144+
"buildTarget": "web:build:production,en"
145+
},
146+
"fr": {
147+
"buildTarget": "web:build:staging,fr"
148+
},
149+
"vi": {
150+
"buildTarget": "web:build:staging,vi"
52151
}
53152
}
153+
},
154+
"extract-i18n": {
155+
"builder": "@angular-devkit/build-angular:extract-i18n",
156+
"options": {
157+
"buildTarget": "web:build",
158+
"format": "json",
159+
"outputPath": "src/locale"
160+
}
161+
},
162+
"test": {
163+
"builder": "@angular-devkit/build-angular:karma",
164+
"options": {
165+
"main": "src/test.ts",
166+
"polyfills": [
167+
"zone.js"
168+
],
169+
"tsConfig": "tsconfig.spec.json",
170+
"karmaConfig": "karma.conf.js",
171+
"assets": [
172+
"src/favicon.ico",
173+
"src/assets"
174+
],
175+
"styles": [
176+
"src/ground-theme.scss"
177+
],
178+
"scripts": [],
179+
"stylePreprocessorOptions": {
180+
"includePaths": [
181+
"src/app/styles"
182+
]
183+
},
184+
"fileReplacements": [
185+
{
186+
"replace": "src/environments/environment.ts",
187+
"with": "src/environments/environment.test.ts"
188+
}
189+
],
190+
"codeCoverage": true
191+
}
192+
},
193+
"lint": {
194+
"builder": "@angular-eslint/builder:lint",
195+
"options": {
196+
"lintFilePatterns": [
197+
"src/**/*.ts",
198+
"src/**/*.html"
199+
]
200+
}
201+
},
202+
"deploy": {
203+
"builder": "@angular/fire:deploy",
204+
"options": {
205+
"buildTarget": "web:build"
206+
}
54207
}
55208
}
56209
}
210+
},
211+
"cli": {
212+
"analytics": "1fa9ccae-cab9-41c7-872e-9ec8191e23c2"
57213
}
58214
}

web/project.json

Lines changed: 28 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -17,170 +17,51 @@
1717
},
1818
"targets": {
1919
"build": {
20-
"executor": "@nx/angular:webpack-browser",
21-
"outputs": ["{options.outputPath}"],
20+
"executor": "nx:run-commands",
2221
"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+
}
11026
},
11127
"serve": {
112-
"executor": "@nx/angular:dev-server",
28+
"executor": "nx:run-commands",
11329
"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
13533
}
13634
},
137-
"extract-i18n": {
138-
"executor": "@nx/angular:extract-i18n",
35+
"test": {
36+
"executor": "nx:run-commands",
13937
"options": {
140-
"buildTarget": "web:build",
141-
"format": "json",
142-
"outputPath": "web/src/locale"
38+
"cwd": "web",
39+
"command": "npx ng test",
40+
"forwardAllArgs": true
14341
}
14442
},
145-
"test": {
146-
"executor": "@angular-devkit/build-angular:karma",
147-
"dependsOn": ["build", "pretest"],
43+
"lint": {
44+
"executor": "nx:run-commands",
14845
"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
16949
}
17050
},
171-
"lint": {
172-
"executor": "@nx/eslint:lint",
51+
"extract-i18n": {
52+
"executor": "nx:run-commands",
17353
"options": {
174-
"lintFilePatterns": [
175-
"web/**/*.ts",
176-
"web/**/*.html"
177-
]
54+
"cwd": "web",
55+
"command": "npx ng extract-i18n",
56+
"forwardAllArgs": true
17857
}
17958
},
18059
"deploy": {
181-
"executor": "@angular/fire:deploy",
60+
"executor": "nx:run-commands",
18261
"options": {
183-
"buildTarget": "web:build"
62+
"cwd": "web",
63+
"command": "npx ng deploy",
64+
"forwardAllArgs": true
18465
}
18566
}
18667
}

0 commit comments

Comments
 (0)