Skip to content

Commit dae4689

Browse files
committed
test: upgrade cli-hello-world to cli 6.0.0-rc.0 (angular#23149)
PR Close angular#23149
1 parent bf88c5c commit dae4689

File tree

7 files changed

+573
-461
lines changed

7 files changed

+573
-461
lines changed

integration/_payload-limits.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
"cli-hello-world": {
33
"master": {
44
"uncompressed": {
5-
"inline": 1508,
6-
"main": "TODO(i): temporarily increase the payload size limit to 257298 from 155112, we need CLI v6 to bring the size down",
7-
"main": 257298,
8-
"polyfills": 60187
5+
"runtime": 1110,
6+
"main": 151765,
7+
"polyfills": 59462
98
}
109
}
1110
},

integration/cli-hello-world/.angular-cli.json

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

integration/cli-hello-world/karma.conf.js

Lines changed: 3 additions & 3 deletions
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: {

integration/cli-hello-world/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"scripts": {
66
"ng": "ng",
77
"start": "ng serve",
8-
"build": "ng build --prod --sourcemaps",
9-
"test": "ng test --single-run",
8+
"build": "ng build --prod --source-map",
9+
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e"
1212
},
@@ -26,7 +26,7 @@
2626
"zone.js": "file:../../node_modules/zone.js"
2727
},
2828
"devDependencies": {
29-
"@angular/cli": "1.7.3",
29+
"@angular/cli": "^6.0.0-rc.0",
3030
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
3131
"@angular/language-service": "file:../../dist/packages-dist/language-service",
3232
"@types/jasmine": "~2.8.3",
@@ -43,6 +43,7 @@
4343
"protractor": "~5.1.2",
4444
"ts-node": "~4.1.0",
4545
"tslint": "~5.9.1",
46-
"typescript": "file:../../node_modules/typescript"
46+
"typescript": "file:../../node_modules/typescript",
47+
"@angular-devkit/build-angular": "~0.5.0"
4748
}
4849
}

integration/cli-hello-world/src/tsconfig.spec.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
]
1111
},
1212
"files": [
13-
"test.ts"
13+
"test.ts",
14+
"polyfills.ts"
1415
],
1516
"include": [
1617
"**/*.spec.ts",
1718
"**/*.d.ts"
1819
]
19-
}
20+
}

0 commit comments

Comments
 (0)