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

Commit 31c777d

Browse files
committed
update to Angular 2.4
1 parent 64bc612 commit 31c777d

9 files changed

+111
-44
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

angular-cli.json

+18-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
{
22
"project": {
3-
"version": "1.0.0-beta.15",
3+
"version": "1.0.0-beta.25.5",
44
"name": "final-project"
55
},
66
"apps": [
77
{
88
"root": "src",
99
"outDir": "dist",
10-
"assets": "assets",
10+
"assets": [
11+
"assets",
12+
"favicon.ico"
13+
],
1114
"index": "index.html",
1215
"main": "main.ts",
1316
"test": "test.ts",
@@ -39,6 +42,18 @@
3942
},
4043
"defaults": {
4144
"styleExt": "css",
42-
"prefixInterfaces": false
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+
}
4358
}
4459
}

e2e/app.po.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { browser, element, by } from 'protractor/globals';
1+
import { browser, element, by } from 'protractor';
22

33
export class FinalProjectPage {
44
navigateTo() {

package.json

+27-23
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,52 @@
44
"license": "MIT",
55
"angular-cli": {},
66
"scripts": {
7+
"ng": "ng",
78
"start": "ng serve",
8-
"lint": "tslint \"src/**/*.ts\"",
9+
"lint": "tslint \"src/**/*.ts\" --project src/tsconfig.json --type-check && tslint \"e2e/**/*.ts\" --project e2e/tsconfig.json --type-check",
910
"test": "ng test",
10-
"pree2e": "webdriver-manager update",
11+
"pree2e": "webdriver-manager update --standalone false --gecko false",
1112
"e2e": "protractor",
1213
"populate-db": "./node_modules/.bin/ts-node ./populate-db.ts",
1314
"batch-server": "./node_modules/.bin/ts-node ./batch-server.ts"
1415
},
1516
"private": true,
1617
"dependencies": {
17-
"@angular/common": "2.0.1",
18-
"@angular/compiler": "2.0.1",
19-
"@angular/core": "2.0.1",
20-
"@angular/forms": "2.0.1",
21-
"@angular/http": "2.0.1",
22-
"@angular/platform-browser": "2.0.1",
23-
"@angular/platform-browser-dynamic": "2.0.1",
24-
"@angular/router": "3.0.0",
18+
"@angular/common": "^2.3.1",
19+
"@angular/compiler": "^2.3.1",
20+
"@angular/core": "^2.3.1",
21+
"@angular/forms": "^2.3.1",
22+
"@angular/http": "^2.3.1",
23+
"@angular/platform-browser": "^2.3.1",
24+
"@angular/platform-browser-dynamic": "^2.3.1",
25+
"@angular/router": "^3.3.1",
2526
"@types/lodash": "^4.14.36",
2627
"@types/request": "0.0.30",
2728
"angularfire2": "^2.0.0-beta.4",
28-
"core-js": "^2.4.0",
29+
"core-js": "^2.4.1",
2930
"firebase": "^3.6.6",
3031
"firebase-queue": "^1.5.0",
3132
"lodash": "^4.15.0",
32-
"rxjs": "5.0.0-beta.12",
33+
"rxjs": "^5.0.1",
3334
"ts-helpers": "^1.1.1",
34-
"zone.js": "^0.6.21"
35+
"zone.js": "^0.7.2"
3536
},
3637
"devDependencies": {
37-
"@types/jasmine": "^2.2.30",
38-
"angular-cli": "1.0.0-beta.16",
39-
"codelyzer": "~0.0.26",
40-
"jasmine-core": "2.4.1",
38+
"@angular/compiler-cli": "^2.3.1",
39+
"@types/jasmine": "2.5.38",
40+
"@types/node": "^6.0.42",
41+
"angular-cli": "1.0.0-beta.25.5",
42+
"codelyzer": "~2.0.0-beta.1",
43+
"jasmine-core": "2.5.2",
4144
"jasmine-spec-reporter": "2.5.0",
42-
"karma": "0.13.22",
43-
"karma-chrome-launcher": "0.2.3",
44-
"karma-jasmine": "0.3.8",
45+
"karma": "1.2.0",
46+
"karma-chrome-launcher": "^2.0.0",
47+
"karma-cli": "^1.0.1",
48+
"karma-jasmine": "^1.0.2",
4549
"karma-remap-istanbul": "^0.2.1",
46-
"protractor": "4.0.3",
50+
"protractor": "~4.0.13",
4751
"ts-node": "1.2.1",
48-
"tslint": "3.13.0",
49-
"typescript": "2.0.10"
52+
"tslint": "^4.3.0",
53+
"typescript": "~2.0.3"
5054
}
5155
}

src/app/app.component.spec.ts

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/* tslint:disable:no-unused-variable */
2+
3+
import { TestBed, async } from '@angular/core/testing';
4+
import { AppComponent } from './app.component';
5+
6+
describe('AppComponent', () => {
7+
beforeEach(() => {
8+
TestBed.configureTestingModule({
9+
declarations: [
10+
AppComponent
11+
],
12+
});
13+
TestBed.compileComponents();
14+
});
15+
16+
it('should create the app', async(() => {
17+
const fixture = TestBed.createComponent(AppComponent);
18+
const app = fixture.debugElement.componentInstance;
19+
expect(app).toBeTruthy();
20+
}));
21+
22+
it(`should have as title 'app works!'`, async(() => {
23+
const fixture = TestBed.createComponent(AppComponent);
24+
const app = fixture.debugElement.componentInstance;
25+
expect(app.title).toEqual('app works!');
26+
}));
27+
28+
it('should render title in a h1 tag', async(() => {
29+
const fixture = TestBed.createComponent(AppComponent);
30+
fixture.detectChanges();
31+
const compiled = fixture.debugElement.nativeElement;
32+
expect(compiled.querySelector('h1').textContent).toContain('app works!');
33+
}));
34+
});

src/polyfills.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file includes polyfills needed by Angular 2 and is loaded before
1+
// This file includes polyfills needed by Angular and is loaded before
22
// the app. You can add your own extra polyfills to this file.
33
import 'core-js/es6/symbol';
44
import 'core-js/es6/object';

src/styles.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
/* You can add global styles to this file, and also import other style files */
1+
/* You can add global styles to this file, and also import other style files */

src/tsconfig.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"baseUrl": "",
34
"declaration": false,
45
"emitDecoratorMetadata": true,
56
"experimentalDecorators": true,
@@ -12,10 +13,6 @@
1213
"target": "es5",
1314
"typeRoots": [
1415
"../node_modules/@types"
15-
],
16-
"types": [
17-
"node",
18-
"firebase"
1916
]
2017
}
2118
}

tslint.json

+15-11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"node_modules/codelyzer"
44
],
55
"rules": {
6+
"callable-types": true,
67
"class-name": true,
78
"comment-format": [
89
true,
@@ -11,12 +12,14 @@
1112
"curly": true,
1213
"eofline": true,
1314
"forin": true,
15+
"import-blacklist": [true, "rxjs"],
16+
"import-spacing": true,
1417
"indent": [
1518
true,
1619
"spaces"
1720
],
21+
"interface-over-type-literal": true,
1822
"label-position": true,
19-
"label-undefined": true,
2023
"max-line-length": [
2124
true,
2225
140
@@ -39,18 +42,17 @@
3942
],
4043
"no-construct": true,
4144
"no-debugger": true,
42-
"no-duplicate-key": true,
4345
"no-duplicate-variable": true,
4446
"no-empty": false,
47+
"no-empty-interface": true,
4548
"no-eval": true,
4649
"no-inferrable-types": true,
4750
"no-shadowed-variable": true,
4851
"no-string-literal": false,
52+
"no-string-throw": true,
4953
"no-switch-case-fall-through": true,
5054
"no-trailing-whitespace": true,
5155
"no-unused-expression": true,
52-
"no-unused-variable": true,
53-
"no-unreachable": true,
5456
"no-use-before-declare": true,
5557
"no-var-keyword": true,
5658
"object-literal-sort-keys": false,
@@ -61,6 +63,7 @@
6163
"check-else",
6264
"check-whitespace"
6365
],
66+
"prefer-const": true,
6467
"quotemark": [
6568
true,
6669
"single"
@@ -83,6 +86,8 @@
8386
"variable-declaration": "nospace"
8487
}
8588
],
89+
"typeof-compare": true,
90+
"unified-signatures": true,
8691
"variable-name": false,
8792
"whitespace": [
8893
true,
@@ -93,12 +98,8 @@
9398
"check-type"
9499
],
95100

96-
"directive-selector-prefix": [true, "app"],
97-
"component-selector-prefix": [true, "app"],
98-
"directive-selector-name": [true, "camelCase"],
99-
"component-selector-name": [true, "kebab-case"],
100-
"directive-selector-type": [true, "attribute"],
101-
"component-selector-type": [true, "element"],
101+
"directive-selector": [true, "attribute", "app", "camelCase"],
102+
"component-selector": [true, "element", "app", "kebab-case"],
102103
"use-input-property-decorator": true,
103104
"use-output-property-decorator": true,
104105
"use-host-property-decorator": true,
@@ -107,6 +108,9 @@
107108
"use-life-cycle-interface": true,
108109
"use-pipe-transform-interface": true,
109110
"component-class-suffix": true,
110-
"directive-class-suffix": true
111+
"directive-class-suffix": true,
112+
"no-access-missing-member": true,
113+
"templates-use-public": true,
114+
"invoke-injectable": true
111115
}
112116
}

0 commit comments

Comments
 (0)