Skip to content
This repository was archived by the owner on Oct 14, 2019. It is now read-only.

Commit 301024f

Browse files
committed
upgrade to Angular 4
1 parent 5e1f232 commit 301024f

File tree

11 files changed

+803
-704
lines changed

11 files changed

+803
-704
lines changed
Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
23
"project": {
3-
"version": "1.0.0-beta.25.5",
4-
"name": "final-project"
4+
"name": "ng4-cli"
55
},
66
"apps": [
77
{
@@ -13,47 +13,45 @@
1313
],
1414
"index": "index.html",
1515
"main": "main.ts",
16+
"polyfills": "polyfills.ts",
1617
"test": "test.ts",
17-
"tsconfig": "tsconfig.json",
18+
"tsconfig": "tsconfig.app.json",
19+
"testTsconfig": "tsconfig.spec.json",
1820
"prefix": "app",
19-
"mobile": false,
2021
"styles": [
2122
"styles.css"
2223
],
2324
"scripts": [],
24-
"environmentSource": {
25-
"source": "environments/environment.ts",
25+
"environmentSource": "environments/environment.ts",
26+
"environments": {
2627
"dev": "environments/environment.ts",
2728
"prod": "environments/environment.prod.ts"
2829
}
2930
}
3031
],
31-
"addons": [],
32-
"packages": [],
3332
"e2e": {
3433
"protractor": {
3534
"config": "./protractor.conf.js"
3635
}
3736
},
37+
"lint": [
38+
{
39+
"project": "src/tsconfig.app.json"
40+
},
41+
{
42+
"project": "src/tsconfig.spec.json"
43+
},
44+
{
45+
"project": "e2e/tsconfig.e2e.json"
46+
}
47+
],
3848
"test": {
3949
"karma": {
4050
"config": "./karma.conf.js"
4151
}
4252
},
4353
"defaults": {
4454
"styleExt": "css",
45-
"prefixInterfaces": false,
46-
"inline": {
47-
"style": false,
48-
"template": false
49-
},
50-
"spec": {
51-
"class": false,
52-
"component": true,
53-
"directive": true,
54-
"module": false,
55-
"pipe": true,
56-
"service": true
57-
}
55+
"component": {}
5856
}
5957
}

db-data.ts

Lines changed: 34 additions & 34 deletions
Large diffs are not rendered by default.

e2e/app.e2e-spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { FinalProjectPage } from './app.po';
1+
import { Ng4CliPage } from './app.po';
22

3-
describe('final-project App', function() {
4-
let page: FinalProjectPage;
3+
describe('ng4-cli App', () => {
4+
let page: Ng4CliPage;
55

66
beforeEach(() => {
7-
page = new FinalProjectPage();
7+
page = new Ng4CliPage();
88
});
99

1010
it('should display message saying app works', () => {

e2e/app.po.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { browser, element, by } from 'protractor';
22

3-
export class FinalProjectPage {
3+
export class Ng4CliPage {
44
navigateTo() {
55
return browser.get('/');
66
}

e2e/tsconfig.e2e.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/e2e",
5+
"module": "commonjs",
6+
"target": "es5",
7+
"types":[
8+
"jasmine",
9+
"node"
10+
]
11+
}
12+
}

package.json

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
{
2-
"name": "final-project",
2+
"name": "ng4-cli",
33
"version": "0.0.0",
44
"license": "MIT",
5-
"angular-cli": {},
65
"scripts": {
76
"ng": "ng",
87
"start": "ng serve",
9-
"lint": "tslint \"src/**/*.ts\" --project src/tsconfig.json --type-check && tslint \"e2e/**/*.ts\" --project e2e/tsconfig.json --type-check",
8+
"build": "ng build",
109
"test": "ng test",
1110
"lint": "ng lint",
1211
"e2e": "ng e2e",
@@ -15,41 +14,41 @@
1514
},
1615
"private": true,
1716
"dependencies": {
18-
"@angular/common": "^2.4.0",
19-
"@angular/compiler": "^2.4.0",
20-
"@angular/core": "^2.4.0",
21-
"@angular/forms": "^2.4.0",
22-
"@angular/http": "^2.4.0",
23-
"@angular/platform-browser": "^2.4.0",
24-
"@angular/platform-browser-dynamic": "^2.4.0",
25-
"@angular/router": "^3.4.0",
17+
"@angular/common": "^4.0.0",
18+
"@angular/compiler": "^4.0.0",
19+
"@angular/core": "^4.0.0",
20+
"@angular/forms": "^4.0.0",
21+
"@angular/http": "^4.0.0",
22+
"@angular/platform-browser": "^4.0.0",
23+
"@angular/platform-browser-dynamic": "^4.0.0",
24+
"@angular/router": "^4.0.0",
2625
"@types/lodash": "^4.14.36",
2726
"@types/request": "0.0.30",
28-
"angularfire2": "^2.0.0-beta.4",
27+
"angularfire2": "^2.0.0-beta.8",
2928
"core-js": "^2.4.1",
30-
"firebase": "^3.6.6",
29+
"firebase": "^3.7.4",
3130
"firebase-queue": "^1.5.0",
3231
"lodash": "^4.15.0",
3332
"rxjs": "^5.1.0",
34-
"zone.js": "^0.7.6"
33+
"zone.js": "^0.8.4"
3534
},
3635
"devDependencies": {
37-
"@angular/cli": "1.0.0-beta.32.3",
38-
"@angular/compiler-cli": "^2.4.0",
36+
"@angular/cli": "1.0.0",
37+
"@angular/compiler-cli": "^4.0.0",
3938
"@types/jasmine": "2.5.38",
4039
"@types/node": "~6.0.60",
41-
"codelyzer": "~2.0.0-beta.4",
40+
"codelyzer": "~2.0.0",
4241
"jasmine-core": "~2.5.2",
4342
"jasmine-spec-reporter": "~3.2.0",
4443
"karma": "~1.4.1",
4544
"karma-chrome-launcher": "~2.0.0",
4645
"karma-cli": "~1.0.1",
46+
"karma-coverage-istanbul-reporter": "^0.2.0",
4747
"karma-jasmine": "~1.1.0",
4848
"karma-jasmine-html-reporter": "^0.2.2",
49-
"karma-coverage-istanbul-reporter": "^0.2.0",
5049
"protractor": "~5.1.0",
5150
"ts-node": "~2.0.0",
52-
"tslint": "~4.4.2",
53-
"typescript": "~2.0.0"
51+
"tslint": "~4.5.0",
52+
"typescript": "~2.2.0"
5453
}
5554
}

src/tsconfig.app.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/app",
5+
"module": "es2015",
6+
"baseUrl": "",
7+
"types": []
8+
},
9+
"exclude": [
10+
"test.ts",
11+
"**/*.spec.ts"
12+
]
13+
}

src/tsconfig.spec.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/spec",
5+
"module": "commonjs",
6+
"target": "es5",
7+
"baseUrl": "",
8+
"types": [
9+
"jasmine",
10+
"node"
11+
]
12+
},
13+
"files": [
14+
"test.ts"
15+
],
16+
"include": [
17+
"**/*.spec.ts",
18+
"**/*.d.ts"
19+
]
20+
}

src/typings.d.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// Typings reference file, see links for more information
2-
// https://github.com/typings/typings
3-
// https://www.typescriptlang.org/docs/handbook/writing-declaration-files.html
4-
5-
declare var System: any;
1+
/* SystemJS module definition */
2+
declare var module: NodeModule;
3+
interface NodeModule {
4+
id: string;
5+
}
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
{
2+
"compileOnSave": false,
23
"compilerOptions": {
3-
"baseUrl": "",
4+
"outDir": "./dist/out-tsc",
5+
"baseUrl": "src",
6+
"sourceMap": true,
47
"declaration": false,
8+
"moduleResolution": "node",
59
"emitDecoratorMetadata": true,
610
"experimentalDecorators": true,
11+
"target": "es5",
12+
"typeRoots": [
13+
"node_modules/@types"
14+
],
715
"lib": [
816
"es2016",
917
"dom"
10-
],
11-
"mapRoot": "./",
12-
"module": "es2015",
13-
"moduleResolution": "node",
14-
"outDir": "../dist/out-tsc",
15-
"sourceMap": true,
16-
"target": "es5",
17-
"typeRoots": [
18-
"../node_modules/@types"
1918
]
2019
}
2120
}

0 commit comments

Comments
 (0)