Skip to content

Commit 2caf4b2

Browse files
committed
build(docs-infra): align code with new CLI v12 apps
This commit aligns the angular.io config files more closely to how a newly generated CLI v12 app would look like. This helps validate the setup and makes it easier to apply new chages in the future (by preventing the angular.io layout from deviating too much from the default new app layout).
1 parent 5161084 commit 2caf4b2

File tree

5 files changed

+37
-26
lines changed

5 files changed

+37
-26
lines changed

aio/angular.json

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,19 @@
1111
"newProjectRoot": "projects",
1212
"projects": {
1313
"site": {
14-
"root": "",
15-
"sourceRoot": "src",
1614
"projectType": "application",
17-
"prefix": "aio",
1815
"schematics": {
16+
"@schematics/angular:application": {
17+
"strict": true
18+
},
1919
"@schematics/angular:component": {
2020
"inlineStyle": true,
2121
"style": "scss"
2222
}
2323
},
24+
"root": "",
25+
"sourceRoot": "src",
26+
"prefix": "aio",
2427
"architect": {
2528
"build": {
2629
"builder": "@angular-devkit/build-angular:browser",
@@ -63,17 +66,19 @@
6366
],
6467
"scripts": [],
6568
"budgets": [
69+
{
70+
"type": "initial",
71+
"maximumWarning": "850kb",
72+
"maximumError": "1mb"
73+
},
6674
{
6775
"type": "anyComponentStyle",
68-
"maximumWarning": "6kb"
76+
"maximumWarning": "2kb",
77+
"maximumError": "4kb"
6978
}
7079
]
7180
},
7281
"configurations": {
73-
"fast": {
74-
"buildOptimizer": false,
75-
"optimization": false
76-
},
7782
"next": {
7883
"fileReplacements": [
7984
{
@@ -112,18 +117,20 @@
112117
},
113118
"ci": {
114119
"progress": false
120+
},
121+
"development": {
122+
"buildOptimizer": false,
123+
"optimization": false,
124+
"outputHashing": "none",
125+
"vendorChunk": true,
126+
"extractLicenses": false
115127
}
116-
}
128+
},
129+
"defaultConfiguration": "stable"
117130
},
118131
"serve": {
119132
"builder": "@angular-devkit/build-angular:dev-server",
120-
"options": {
121-
"browserTarget": "site:build"
122-
},
123133
"configurations": {
124-
"fast": {
125-
"browserTarget": "site:build:fast"
126-
},
127134
"next": {
128135
"browserTarget": "site:build:next"
129136
},
@@ -138,8 +145,12 @@
138145
},
139146
"ci": {
140147
"browserTarget": "site:build:ci"
148+
},
149+
"development": {
150+
"browserTarget": "site:build:development"
141151
}
142-
}
152+
},
153+
"defaultConfiguration": "development"
143154
},
144155
"extract-i18n": {
145156
"builder": "@angular-devkit/build-angular:extract-i18n",

aio/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"aio-use-npm": "node tools/ng-packages-installer restore .",
1212
"aio-check-local": "node tools/ng-packages-installer check .",
1313
"ng": "yarn check-env && ng",
14-
"start": "yarn check-env && ng serve --configuration=fast",
14+
"start": "yarn check-env && ng serve",
1515
"prebuild": "yarn setup",
1616
"build": "yarn ~~build",
1717
"prebuild-local": "yarn setup-local",

aio/src/environments/environment.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// The file contents for the current environment will overwrite these during build.
2-
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
2+
// The build system defaults to using `environment.ts`, but if you do
33
// `ng build --configuration=<foo>` then `environment.<foo>.ts` will be used instead.
4-
// The list of which configurations maps to which file can be found in `angular.json`.
4+
// The list of which configuration maps to which file can be found in `angular.json`.
55

66

77
export const environment = {

aio/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"experimentalDecorators": true,
1717
"moduleResolution": "node",
1818
"importHelpers": true,
19-
"target": "es2015",
19+
"target": "es2017",
2020
"module": "es2020",
2121
"lib": [
2222
"es2018",

goldens/size-tracking/aio-payloads.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
"aio": {
33
"master": {
44
"uncompressed": {
5-
"runtime-es2015": 4619,
6-
"main-es2015": 453855,
7-
"polyfills-es2015": 55210
5+
"runtime-es2017": 4619,
6+
"main-es2017": 454043,
7+
"polyfills-es2017": 55210
88
}
99
}
1010
},
1111
"aio-local": {
1212
"master": {
1313
"uncompressed": {
14-
"runtime-es2015": 4619,
15-
"main-es2015": 453981,
16-
"polyfills-es2015": 55291
14+
"runtime-es2017": 4619,
15+
"main-es2017": 454178,
16+
"polyfills-es2017": 55348
1717
}
1818
}
1919
}

0 commit comments

Comments
 (0)