Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 2b79b4f

Browse files
authored
Update to Angular CLI v6 (#431)
1 parent c4fd88d commit 2b79b4f

File tree

21 files changed

+6573
-5746
lines changed

21 files changed

+6573
-5746
lines changed

.travis.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ language: node_js
22
sudo: false
33

44
node_js:
5-
- '6.9.1'
5+
# Use the explicit NodeJS LTS version 8.9.4 to avoid any automatic upgrade of the version.
6+
# This ensures that all Travis jobs run consistently and don't have different Node versions.
7+
- '8.9.4'
68

79
branches:
810
only:
@@ -14,7 +16,7 @@ env:
1416
- SAUCE_USERNAME=angular-ci
1517
- SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987
1618
- BROWSER_STACK_USERNAME=angularteam1
17-
- BROWSER_STACK_ACCESS_KEY=BWCd4SynLzdDcv8xtzsB
19+
- BROWSER_STACK_ACCESS_KEY=CaXMeMHD9pr5PHg8N7Jq
1820
- BROWSER_PROVIDER_READY_FILE=/tmp/material-angular-io-build/readyfile
1921
- BROWSER_PROVIDER_ERROR_FILE=/tmp/material-angular-io-build/errorfile
2022
matrix:
@@ -38,4 +40,4 @@ script:
3840

3941
cache:
4042
directories:
41-
- node_modules
43+
- node_modules

angular-cli.json

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

angular.json

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
{
2+
"version": 1,
3+
"newProjectRoot": "projects",
4+
"projects": {
5+
"material-angular-io": {
6+
"root": "",
7+
"projectType": "application",
8+
"architect": {
9+
"build": {
10+
"builder": "@angular-devkit/build-angular:browser",
11+
"options": {
12+
"aot": true,
13+
"sourceMap": false,
14+
"outputPath": "dist",
15+
"index": "src/index.html",
16+
"main": "src/main.ts",
17+
"tsConfig": "src/tsconfig.json",
18+
"assets": [
19+
{
20+
"glob": "**/*",
21+
"input": "src/assets",
22+
"output": "/assets"
23+
},
24+
{
25+
"glob": "favicon.ico",
26+
"input": "src",
27+
"output": "/"
28+
}
29+
],
30+
"styles": [
31+
{
32+
"input": "src/main.scss"
33+
},
34+
{
35+
"input": "src/highlightjs/material-light.css"
36+
},
37+
{
38+
"input": "src/assets/pink-bluegrey.css",
39+
"lazy": true,
40+
"bundleName": "pink-bluegrey"
41+
},
42+
{
43+
"input": "src/assets/deeppurple-amber.css",
44+
"lazy": true,
45+
"bundleName": "deeppurple-amber"
46+
},
47+
{
48+
"input": "src/assets/indigo-pink.css",
49+
"lazy": true,
50+
"bundleName": "indigo-pink"
51+
},
52+
{
53+
"input": "src/assets/purple-green.css",
54+
"lazy": true,
55+
"bundleName": "purple-green"
56+
}
57+
],
58+
"scripts": []
59+
},
60+
"configurations": {
61+
"production": {
62+
"optimization": true,
63+
"outputHashing": "all",
64+
"sourceMap": false,
65+
"extractCss": true,
66+
"namedChunks": false,
67+
"aot": true,
68+
"extractLicenses": true,
69+
"vendorChunk": false,
70+
"buildOptimizer": true,
71+
"serviceWorker": true,
72+
"fileReplacements": [
73+
{
74+
"src": "src/environments/environment.ts",
75+
"replaceWith": "src/environments/environment.prod.ts"
76+
}
77+
]
78+
}
79+
}
80+
},
81+
"serve": {
82+
"builder": "@angular-devkit/build-angular:dev-server",
83+
"options": {
84+
"browserTarget": "material-angular-io:build"
85+
},
86+
"configurations": {
87+
"production": {
88+
"browserTarget": "material-angular-io:build:production"
89+
}
90+
}
91+
},
92+
"extract-i18n": {
93+
"builder": "@angular-devkit/build-angular:extract-i18n",
94+
"options": {
95+
"browserTarget": "material-angular-io:build"
96+
}
97+
},
98+
"test": {
99+
"builder": "@angular-devkit/build-angular:karma",
100+
"options": {
101+
"main": "src/test.ts",
102+
"polyfills": "src/polyfills.ts",
103+
"karmaConfig": "./karma.conf.js",
104+
"tsConfig": "src/tsconfig.spec.json",
105+
"scripts": [],
106+
"styles": [
107+
{
108+
"input": "src/main.scss"
109+
},
110+
{
111+
"input": "src/highlightjs/material-light.css"
112+
},
113+
{
114+
"input": "src/assets/pink-bluegrey.css",
115+
"lazy": true,
116+
"bundleName": "pink-bluegrey"
117+
},
118+
{
119+
"input": "src/assets/deeppurple-amber.css",
120+
"lazy": true,
121+
"bundleName": "deeppurple-amber"
122+
},
123+
{
124+
"input": "src/assets/indigo-pink.css",
125+
"lazy": true,
126+
"bundleName": "indigo-pink"
127+
},
128+
{
129+
"input": "src/assets/purple-green.css",
130+
"lazy": true,
131+
"bundleName": "purple-green"
132+
}
133+
],
134+
"assets": [
135+
{
136+
"glob": "**/*",
137+
"input": "src/assets",
138+
"output": "/assets"
139+
},
140+
{
141+
"glob": "favicon.ico",
142+
"input": "src",
143+
"output": "/"
144+
}
145+
]
146+
}
147+
},
148+
"lint": {
149+
"builder": "@angular-devkit/build-angular:tslint",
150+
"options": {
151+
"tsConfig": [
152+
"src/tsconfig.json"
153+
],
154+
"exclude": [
155+
"**/node_modules/**"
156+
]
157+
}
158+
}
159+
}
160+
},
161+
"material-angular-io-e2e": {
162+
"root": "",
163+
"projectType": "application",
164+
"cli": {},
165+
"schematics": {},
166+
"architect": {
167+
"e2e": {
168+
"builder": "@angular-devkit/build-angular:protractor",
169+
"options": {
170+
"protractorConfig": "./protractor.conf.js",
171+
"devServerTarget": "material-angular-io:serve"
172+
}
173+
}
174+
}
175+
}
176+
},
177+
"schematics": {
178+
"@schematics/angular:component": {
179+
"prefix": "app",
180+
"styleext": "css"
181+
},
182+
"@schematics/angular:directive": {
183+
"prefix": "app"
184+
}
185+
}
186+
}

karma.conf.js

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,29 @@
11
// Karma configuration file, see link for more information
22
// https://karma-runner.github.io/0.13/config/configuration-file.html
33
const {customLaunchers, platformMap} = require('./browser-providers');
4-
const path = require('path');
54

65
module.exports = function (config) {
76
config.set({
87
basePath: '',
9-
frameworks: ['jasmine', '@angular/cli'],
8+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
109
plugins: [
1110
require('karma-jasmine'),
1211
require('karma-chrome-launcher'),
13-
require('karma-remap-istanbul'),
14-
require('@angular/cli/plugins/karma'),
12+
require('karma-jasmine-html-reporter'),
13+
require('karma-coverage-istanbul-reporter'),
14+
require('@angular-devkit/build-angular/plugins/karma'),
1515
require('karma-browserstack-launcher'),
1616
require('karma-sauce-launcher'),
1717
],
18-
files: [
19-
{pattern: './src/test.ts', watched: false},
20-
{pattern: 'node_modules/hammerjs/hammer.js', included: true, watched: false},
21-
],
22-
preprocessors: {
23-
'./src/test.ts': ['@angular/cli']
24-
},
25-
mime: {
26-
'text/x-typescript': ['ts','tsx']
27-
},
28-
remapIstanbulReporter: {
29-
reports: {
30-
html: 'coverage',
31-
lcovonly: './coverage/coverage.lcov'
32-
}
18+
client: {
19+
clearContext: false // leave Jasmine Spec Runner output visible in browser
3320
},
34-
angularCli: {
35-
config: './angular-cli.json',
36-
environment: 'dev'
21+
coverageIstanbulReporter: {
22+
dir: require('path').join(__dirname, 'coverage'),
23+
reports: ['html', 'lcovonly'],
24+
fixWebpackSourcePaths: true
3725
},
38-
reporters: config.angularCli && config.angularCli.codeCoverage
39-
? ['dots', 'karma-remap-istanbul']
40-
: ['dots'],
26+
rreporters: ['progress', 'kjhtml'],
4127
port: 9876,
4228
colors: true,
4329
logLevel: config.LOG_INFO,
File renamed without changes.

0 commit comments

Comments
 (0)