Skip to content

Commit 8fa49a5

Browse files
committed
Updating the angular CLI
1 parent 53206e3 commit 8fa49a5

File tree

6 files changed

+4455
-270
lines changed

6 files changed

+4455
-270
lines changed

.angular-cli.json

-60
This file was deleted.

angular.json

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"my-app": {
7+
"root": "",
8+
"sourceRoot": "src",
9+
"projectType": "application",
10+
"architect": {
11+
"build": {
12+
"builder": "@angular-devkit/build-angular:browser",
13+
"options": {
14+
"outputPath": "dist",
15+
"index": "src/index.html",
16+
"main": "src/main.ts",
17+
"tsConfig": "src/tsconfig.app.json",
18+
"polyfills": "src/polyfills.ts",
19+
"assets": [
20+
"src/assets",
21+
"src/favicon.ico"
22+
],
23+
"styles": [
24+
"src/styles.scss",
25+
"node_modules/@fortawesome/fontawesome-free-webfonts/css/fontawesome.css",
26+
"node_modules/@fortawesome/fontawesome-free-webfonts/css/fa-regular.css",
27+
"node_modules/@fortawesome/fontawesome-free-webfonts/css/fa-solid.css"
28+
],
29+
"scripts": []
30+
},
31+
"configurations": {
32+
"production": {
33+
"optimization": true,
34+
"outputHashing": "all",
35+
"sourceMap": false,
36+
"extractCss": true,
37+
"namedChunks": false,
38+
"aot": true,
39+
"extractLicenses": true,
40+
"vendorChunk": false,
41+
"buildOptimizer": true,
42+
"fileReplacements": [
43+
{
44+
"replace": "src/environments/environment.ts",
45+
"with": "src/environments/environment.prod.ts"
46+
}
47+
]
48+
}
49+
}
50+
},
51+
"serve": {
52+
"builder": "@angular-devkit/build-angular:dev-server",
53+
"options": {
54+
"browserTarget": "my-app:build"
55+
},
56+
"configurations": {
57+
"production": {
58+
"browserTarget": "my-app:build:production"
59+
}
60+
}
61+
},
62+
"extract-i18n": {
63+
"builder": "@angular-devkit/build-angular:extract-i18n",
64+
"options": {
65+
"browserTarget": "my-app:build"
66+
}
67+
},
68+
"test": {
69+
"builder": "@angular-devkit/build-angular:karma",
70+
"options": {
71+
"main": "src/test.ts",
72+
"karmaConfig": "./karma.conf.js",
73+
"polyfills": "src/polyfills.ts",
74+
"tsConfig": "src/tsconfig.spec.json",
75+
"scripts": [],
76+
"styles": [
77+
"src/styles.scss",
78+
"node_modules/@fortawesome/fontawesome-free-webfonts/css/fontawesome.css",
79+
"node_modules/@fortawesome/fontawesome-free-webfonts/css/fa-regular.css",
80+
"node_modules/@fortawesome/fontawesome-free-webfonts/css/fa-solid.css"
81+
],
82+
"assets": [
83+
"src/assets",
84+
"src/favicon.ico"
85+
]
86+
}
87+
},
88+
"lint": {
89+
"builder": "@angular-devkit/build-angular:tslint",
90+
"options": {
91+
"tsConfig": [
92+
"src/tsconfig.app.json",
93+
"src/tsconfig.spec.json"
94+
],
95+
"exclude": [
96+
"**/node_modules/**"
97+
]
98+
}
99+
}
100+
}
101+
},
102+
"my-app-e2e": {
103+
"root": "",
104+
"sourceRoot": "",
105+
"projectType": "application",
106+
"architect": {
107+
"e2e": {
108+
"builder": "@angular-devkit/build-angular:protractor",
109+
"options": {
110+
"protractorConfig": "./protractor.conf.js",
111+
"devServerTarget": "my-app:serve"
112+
}
113+
},
114+
"lint": {
115+
"builder": "@angular-devkit/build-angular:tslint",
116+
"options": {
117+
"tsConfig": [
118+
"e2e/tsconfig.e2e.json"
119+
],
120+
"exclude": [
121+
"**/node_modules/**"
122+
]
123+
}
124+
}
125+
}
126+
}
127+
},
128+
"defaultProject": "my-app",
129+
"schematics": {
130+
"@schematics/angular:component": {
131+
"prefix": "app",
132+
"styleext": "scss"
133+
},
134+
"@schematics/angular:directive": {
135+
"prefix": "app"
136+
}
137+
}
138+
}

karma.conf.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
module.exports = function (config) {
55
config.set({
66
basePath: '',
7-
frameworks: ['jasmine', '@angular/cli'],
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
88
plugins: [
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
1111
require('karma-jasmine-html-reporter'),
1212
require('karma-coverage-istanbul-reporter'),
13-
require('@angular/cli/plugins/karma')
13+
require('@angular-devkit/build-angular/plugins/karma')
1414
],
1515
client:{
1616
clearContext: false // leave Jasmine Spec Runner output visible in browser
1717
},
1818
coverageIstanbulReporter: {
19-
reports: [ 'html', 'lcovonly' ],
19+
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
2020
fixWebpackSourcePaths: true
2121
},
2222
angularCli: {

0 commit comments

Comments
 (0)