Skip to content

Commit ff0cdc2

Browse files
committed
build: upgrade to Angular 7
1 parent c4fcccc commit ff0cdc2

11 files changed

+8562
-5469
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ notifications:
1111
email: false
1212

1313
node_js:
14-
- '6'
14+
- '9'
1515

1616
branches:
1717
except:

angular-cli.json

-57
This file was deleted.

angular.json

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"testing-patterns": {
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": "testing-patterns:build"
52+
},
53+
"configurations": {
54+
"production": {
55+
"browserTarget": "testing-patterns:build:production"
56+
}
57+
}
58+
},
59+
"extract-i18n": {
60+
"builder": "@angular-devkit/build-angular:extract-i18n",
61+
"options": {
62+
"browserTarget": "testing-patterns: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+
}
91+
}
92+
}
93+
},
94+
"testing-patterns-e2e": {
95+
"root": "e2e",
96+
"sourceRoot": "e2e",
97+
"projectType": "application",
98+
"architect": {
99+
"e2e": {
100+
"builder": "@angular-devkit/build-angular:protractor",
101+
"options": {
102+
"protractorConfig": "./protractor.conf.js",
103+
"devServerTarget": "testing-patterns:serve"
104+
}
105+
},
106+
"lint": {
107+
"builder": "@angular-devkit/build-angular:tslint",
108+
"options": {
109+
"tsConfig": [
110+
"e2e/tsconfig.e2e.json"
111+
],
112+
"exclude": []
113+
}
114+
}
115+
}
116+
}
117+
},
118+
"defaultProject": "testing-patterns",
119+
"schematics": {
120+
"@schematics/angular:component": {
121+
"prefix": "app",
122+
"styleext": "css"
123+
},
124+
"@schematics/angular:directive": {
125+
"prefix": "app"
126+
}
127+
}
128+
}

karma.conf.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,23 @@
44
module.exports = function(config) {
55
var configuration = {
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
require('karma-mocha-reporter')
1515
],
1616
client: {
1717
clearContext: false // leave Jasmine Spec Runner output visible in browser
1818
},
1919
coverageIstanbulReporter: {
20-
reports: ['html', 'lcovonly'],
20+
dir: require('path').join(__dirname, 'coverage'), reports: ['html', 'lcovonly'],
2121
fixWebpackSourcePaths: true
2222
},
23-
angularCli: {
24-
environment: 'dev'
25-
},
23+
2624
reporters: ['mocha', 'kjhtml'],
2725
port: 9876,
2826
colors: true,

0 commit comments

Comments
 (0)