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

Commit c276fed

Browse files
committed
Update to Angular CLI v6 (rc4)
This includes the following: * Running ng update @angular/cli, which updates the project config file, karma config, etc. * * Changing the build defaults to `aot: true` and `sourceMap: false` * Updating the stackblitz versions for Angular 6
1 parent c4fd88d commit c276fed

File tree

7 files changed

+2283
-1538
lines changed

7 files changed

+2283
-1538
lines changed

angular-cli.json

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

angular.json

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
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+
"karmaConfig": "./karma.conf.js",
103+
"scripts": [],
104+
"styles": [
105+
{
106+
"input": "src/main.scss"
107+
},
108+
{
109+
"input": "src/highlightjs/material-light.css"
110+
},
111+
{
112+
"input": "src/assets/pink-bluegrey.css",
113+
"lazy": true,
114+
"bundleName": "pink-bluegrey"
115+
},
116+
{
117+
"input": "src/assets/deeppurple-amber.css",
118+
"lazy": true,
119+
"bundleName": "deeppurple-amber"
120+
},
121+
{
122+
"input": "src/assets/indigo-pink.css",
123+
"lazy": true,
124+
"bundleName": "indigo-pink"
125+
},
126+
{
127+
"input": "src/assets/purple-green.css",
128+
"lazy": true,
129+
"bundleName": "purple-green"
130+
}
131+
],
132+
"assets": [
133+
{
134+
"glob": "**/*",
135+
"input": "src/assets",
136+
"output": "/assets"
137+
},
138+
{
139+
"glob": "favicon.ico",
140+
"input": "src",
141+
"output": "/"
142+
}
143+
]
144+
}
145+
},
146+
"lint": {
147+
"builder": "@angular-devkit/build-angular:tslint",
148+
"options": {
149+
"tsConfig": [],
150+
"exclude": []
151+
}
152+
}
153+
}
154+
},
155+
"material-angular-io-e2e": {
156+
"root": "",
157+
"projectType": "application",
158+
"cli": {},
159+
"schematics": {},
160+
"architect": {
161+
"e2e": {
162+
"builder": "@angular-devkit/build-angular:protractor",
163+
"options": {
164+
"protractorConfig": "./protractor.conf.js",
165+
"devServerTarget": "material-angular-io:serve"
166+
}
167+
},
168+
"lint": {
169+
"builder": "@angular-devkit/build-angular:tslint",
170+
"options": {
171+
"tsConfig": [],
172+
"exclude": []
173+
}
174+
}
175+
}
176+
}
177+
},
178+
"schematics": {
179+
"@schematics/angular:component": {
180+
"prefix": "app",
181+
"styleext": "css"
182+
},
183+
"@schematics/angular:directive": {
184+
"prefix": "app"
185+
}
186+
}
187+
}

karma.conf.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ const path = require('path');
66
module.exports = function (config) {
77
config.set({
88
basePath: '',
9-
frameworks: ['jasmine', '@angular/cli'],
9+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
1010
plugins: [
1111
require('karma-jasmine'),
1212
require('karma-chrome-launcher'),
1313
require('karma-remap-istanbul'),
14-
require('@angular/cli/plugins/karma'),
14+
require('@angular-devkit/build-angular/plugins/karma'),
1515
require('karma-browserstack-launcher'),
1616
require('karma-sauce-launcher'),
1717
],
@@ -20,13 +20,13 @@ module.exports = function (config) {
2020
{pattern: 'node_modules/hammerjs/hammer.js', included: true, watched: false},
2121
],
2222
preprocessors: {
23-
'./src/test.ts': ['@angular/cli']
23+
'./src/test.ts': ['@angular-devkit/build-angular']
2424
},
2525
mime: {
2626
'text/x-typescript': ['ts','tsx']
2727
},
2828
remapIstanbulReporter: {
29-
reports: {
29+
dir: require('path').join(__dirname, 'coverage'), reports: {
3030
html: 'coverage',
3131
lcovonly: './coverage/coverage.lcov'
3232
}
File renamed without changes.

0 commit comments

Comments
 (0)