Skip to content

Commit b29d6ad

Browse files
authored
SPA Angular 11->12 updates (#33353)
1 parent 769ff8e commit b29d6ad

File tree

15 files changed

+83
-247
lines changed

15 files changed

+83
-247
lines changed

src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/.eslintrc.json

Lines changed: 0 additions & 51 deletions
This file was deleted.

src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Company.WebApplication1
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.0.
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.0.2.
44

55
## Development server
66

@@ -12,15 +12,15 @@ Run `ng generate component component-name` to generate a new component. You can
1212

1313
## Build
1414

15-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
1616

1717
## Running unit tests
1818

1919
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
2020

2121
## Running end-to-end tests
2222

23-
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
23+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
2424

2525
## Further help
2626

src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/angular.json

Lines changed: 40 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
"newProjectRoot": "projects",
55
"projects": {
66
"Company.WebApplication1": {
7+
"projectType": "application",
8+
"schematics": {
9+
"@schematics/angular:application": {
10+
"strict": true
11+
}
12+
},
713
"root": "",
814
"sourceRoot": "src",
9-
"projectType": "application",
1015
"prefix": "app",
11-
"schematics": {},
1216
"architect": {
1317
"build": {
1418
"builder": "@angular-devkit/build-angular:browser",
@@ -30,35 +34,49 @@
3034
},
3135
"configurations": {
3236
"production": {
37+
"budgets": [
38+
{
39+
"type": "initial",
40+
"maximumWarning": "500kb",
41+
"maximumError": "1mb"
42+
},
43+
{
44+
"type": "anyComponentStyle",
45+
"maximumWarning": "2kb",
46+
"maximumError": "4kb"
47+
}
48+
],
3349
"fileReplacements": [
3450
{
3551
"replace": "src/environments/environment.ts",
3652
"with": "src/environments/environment.prod.ts"
3753
}
3854
],
39-
"optimization": true,
40-
"outputHashing": "all",
41-
"sourceMap": false,
42-
"extractCss": true,
43-
"namedChunks": false,
44-
"aot": true,
45-
"extractLicenses": true,
46-
"vendorChunk": false,
47-
"buildOptimizer": true
55+
"outputHashing": "all"
56+
},
57+
"development": {
58+
"buildOptimizer": false,
59+
"optimization": false,
60+
"vendorChunk": true,
61+
"extractLicenses": false,
62+
"sourceMap": true,
63+
"namedChunks": true
4864
}
49-
}
65+
},
66+
"defaultConfiguration": "production"
5067
},
5168
"serve": {
5269
"builder": "@angular-devkit/build-angular:dev-server",
53-
"options": {
54-
"browserTarget": "Company.WebApplication1:build",
55-
"proxyConfig": "proxy.conf.js"
56-
},
5770
"configurations": {
5871
"production": {
5972
"browserTarget": "Company.WebApplication1:build:production"
73+
},
74+
"development": {
75+
"browserTarget": "Company.WebApplication1:build:development",
76+
"proxyConfig": "proxy.conf.js"
6077
}
61-
}
78+
},
79+
"defaultConfiguration": "development"
6280
},
6381
"extract-i18n": {
6482
"builder": "@angular-devkit/build-angular:extract-i18n",
@@ -73,22 +91,13 @@
7391
"polyfills": "src/polyfills.ts",
7492
"tsConfig": "tsconfig.spec.json",
7593
"karmaConfig": "karma.conf.js",
94+
"assets": [
95+
"src/assets"
96+
],
7697
"styles": [
7798
"src/styles.css"
7899
],
79-
"scripts": [],
80-
"assets": [
81-
"src/assets"
82-
]
83-
}
84-
},
85-
"lint": {
86-
"builder": "@angular-eslint/builder:lint",
87-
"options": {
88-
"lintFilePatterns": [
89-
"src/**/*.ts",
90-
"src/**/*.html"
91-
]
100+
"scripts": []
92101
}
93102
},
94103
"server": {
@@ -118,32 +127,7 @@
118127
}
119128
}
120129
}
121-
},
122-
"Company.WebApplication1-e2e": {
123-
"root": "e2e/",
124-
"projectType": "application",
125-
"architect": {
126-
"e2e": {
127-
"builder": "@angular-devkit/build-angular:protractor",
128-
"options": {
129-
"protractorConfig": "e2e/protractor.conf.js",
130-
"devServerTarget": "Company.WebApplication1:serve"
131-
}
132-
},
133-
"lint": {
134-
"builder": "@angular-eslint/builder:lint",
135-
"options": {
136-
"lintFilePatterns": [
137-
"e2e//**/*.ts",
138-
"e2e//**/*.html"
139-
]
140-
}
141-
}
142-
}
143130
}
144131
},
145-
"defaultProject": "Company.WebApplication1",
146-
"cli": {
147-
"defaultCollection": "@angular-eslint/schematics"
148-
}
132+
"defaultProject": "Company.WebApplication1"
149133
}

src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/e2e/protractor.conf.js

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/e2e/src/app.e2e-spec.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/e2e/src/app.po.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/e2e/tsconfig.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/ProjectTemplates/Web.Spa.ProjectTemplates/content/Angular-CSharp/ClientApp/package.json

Lines changed: 20 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -13,59 +13,44 @@
1313
//#endif
1414
"build": "ng build",
1515
"build:ssr": "ng run Company.WebApplication1:server:dev",
16-
"test": "ng test",
17-
"lint": "ng lint",
18-
"e2e": "ng e2e"
16+
"watch": "ng build --watch --configuration development",
17+
"test": "ng test"
1918
},
2019
"private": true,
2120
"dependencies": {
22-
"@angular/animations": "~11.2.11",
23-
"@angular/common": "~11.2.11",
24-
"@angular/compiler": "~11.2.11",
25-
"@angular/core": "~11.2.11",
26-
"@angular/forms": "~11.2.11",
27-
"@angular/platform-browser": "~11.2.11",
28-
"@angular/platform-browser-dynamic": "~11.2.11",
29-
"@angular/platform-server": "~11.2.11",
30-
"@angular/router": "~11.2.11",
21+
"@angular/animations": "~12.0.2",
22+
"@angular/common": "~12.0.2",
23+
"@angular/compiler": "~12.0.2",
24+
"@angular/core": "~12.0.2",
25+
"@angular/forms": "~12.0.2",
26+
"@angular/platform-browser": "~12.0.2",
27+
"@angular/platform-browser-dynamic": "~12.0.2",
28+
"@angular/platform-server": "~12.0.2",
29+
"@angular/router": "~12.0.2",
3130
"@nguniversal/module-map-ngfactory-loader": "^8.2.6",
3231
"bootstrap": "^4.6.0",
3332
"jquery": "^3.5.1",
3433
"oidc-client": "^1.11.3",
3534
"popper.js": "^1.16.0",
3635
"run-script-os": "^1.1.6",
3736
"rxjs": "~6.6.0",
38-
"tslib": "^2.0.0",
39-
"zone.js": "~0.11.3"
37+
"tslib": "^2.1.0",
38+
"zone.js": "~0.11.4"
4039
},
4140
"devDependencies": {
42-
"@angular-devkit/build-angular": "~0.1102.10",
43-
"@angular-eslint/builder": "4.0.0",
44-
"@angular-eslint/eslint-plugin": "4.0.0",
45-
"@angular-eslint/eslint-plugin-template": "4.0.0",
46-
"@angular-eslint/schematics": "4.0.0",
47-
"@angular-eslint/template-parser": "4.0.0",
48-
"@angular/cli": "~11.2.10",
49-
"@angular/compiler-cli": "~11.2.11",
50-
"@types/jasmine": "^3.6.10",
41+
"@angular-devkit/build-angular": "~12.0.2",
42+
"@angular/cli": "~12.0.2",
43+
"@angular/compiler-cli": "~12.0.2",
44+
"@types/jasmine": "~3.6.0",
5145
"@types/jasminewd2": "~2.0.8",
5246
"@types/node": "^12.11.1",
53-
"@typescript-eslint/eslint-plugin": "4.16.1",
54-
"@typescript-eslint/parser": "4.16.1",
55-
"eslint": "^7.6.0",
56-
"ini": "^1.3.7",
57-
"jasmine-core": "~3.6.0",
58-
"jasmine-spec-reporter": "~5.0.0",
59-
"karma": "~6.1.0",
47+
"jasmine-core": "~3.7.0",
48+
"karma": "~6.3.0",
6049
"karma-chrome-launcher": "~3.1.0",
6150
"karma-coverage": "~2.0.3",
62-
"karma-coverage-istanbul-reporter": "~2.1.0",
6351
"karma-jasmine": "~4.0.0",
6452
"karma-jasmine-html-reporter": "^1.5.0",
65-
"karma-spec-reporter": "0.0.32",
66-
"protractor": "~7.0.0",
67-
"ts-node": "~8.4.1",
68-
"typescript": "~4.1.5"
53+
"typescript": "~4.2.3"
6954
},
7055
"optionalDependencies": {}
7156
}

0 commit comments

Comments
 (0)