Skip to content

Commit 03dfa0e

Browse files
author
tszewcow
committed
migration to angular 7
1 parent 708ad01 commit 03dfa0e

16 files changed

+5323
-7052
lines changed

Diff for: .angular-cli.json

-60
This file was deleted.

Diff for: .gitignore

-4
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ npm-debug.log
3434
testem.log
3535
/typings
3636

37-
# e2e
38-
/e2e/*.js
39-
/e2e/*.map
40-
4137
# System Files
4238
.DS_Store
4339
Thumbs.db

Diff for: README.adoc

+11-6
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ This repository contains https://angular.io[Angular] training materials:
1212
You need a Git client, the https://nodejs.org/[Node.js] and the https://github.com/angular/angular-cli[Angular CLI] to make use of the project seed.
1313
It is highly recommended to use the following versions:
1414

15-
* Node.js 8.9.4
16-
* Angular CLI 1.7.1
15+
* Node.js 10.13.0
16+
* Angular CLI 7.0.5
1717

1818
==== Git
1919
Check if you have a Git client already installed:
@@ -34,16 +34,22 @@ Node.js versions on your machine. The windows version of nvm can be found https:
3434
Once https://github.com/creationix/nvm[nvm] installed, install the Node.js:
3535

3636
----
37-
nvm install 8.9.4
38-
nvm use 8.9.4
37+
nvm install 10.13.0
38+
nvm use 10.13.0
3939
----
4040

4141
==== Angular CLI
4242

4343
Having https://www.npmjs.com/[npm] installed you can install https://github.com/angular/angular-cli[Angular CLI] like this:
4444

4545
----
46-
npm install -g @angular/[email protected]
46+
npm install -g @angular/[email protected]
47+
----
48+
49+
Set https://www.npmjs.com/[npm] as a package manager (https://yarnpkg.com[yarn] is the default):
50+
51+
----
52+
ng config -g cli.packageManager npm
4753
----
4854

4955
=== Start from _Hello World!_
@@ -68,4 +74,3 @@ ng serve --open
6874
----
6975

7076
A _Hello World!_ web page should open in your default browser.
71-

Diff for: angular.json

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

Diff for: protractor.conf.js renamed to e2e/protractor.conf.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { SpecReporter } = require('jasmine-spec-reporter');
66
exports.config = {
77
allScriptsTimeout: 11000,
88
specs: [
9-
'./e2e/**/*.e2e-spec.ts'
9+
'./src/**/*.e2e-spec.ts'
1010
],
1111
capabilities: {
1212
'browserName': 'chrome'
@@ -21,8 +21,8 @@ exports.config = {
2121
},
2222
onPrepare() {
2323
require('ts-node').register({
24-
project: 'e2e/tsconfig.e2e.json'
24+
project: require('path').join(__dirname, './tsconfig.e2e.json')
2525
});
2626
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
2727
}
28-
};
28+
};
File renamed without changes.

Diff for: e2e/app.po.ts renamed to e2e/src/app.po.ts

File renamed without changes.

0 commit comments

Comments
 (0)