Skip to content

Commit 383837c

Browse files
committed
fixed ng project definition issue after upgrading
angular/angular-cli#12215 (comment)
1 parent 32ee4b6 commit 383837c

9 files changed

+4925
-225
lines changed

.angular-cli.json

-60
This file was deleted.

angular.json

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

karma.conf.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,22 @@
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
},
22-
angularCli: {
23-
environment: 'dev'
24-
},
22+
2523
reporters: ['progress', 'kjhtml'],
2624
port: 9876,
2725
colors: true,

0 commit comments

Comments
 (0)