diff --git a/ponyracer/e2e/app.e2e-spec.ts b/ponyracer/e2e/app.e2e-spec.ts index e51575927..605376d44 100644 --- a/ponyracer/e2e/app.e2e-spec.ts +++ b/ponyracer/e2e/app.e2e-spec.ts @@ -7,8 +7,8 @@ describe('ponyracer App', () => { page = new PonyracerPage(); }); - it('should display message saying app works', () => { + it('should display welcome message', () => { page.navigateTo(); - expect(page.getParagraphText()).toEqual('app works!'); + expect(page.getParagraphText()).toEqual('Welcome to app!!'); }); }); diff --git a/ponyracer/e2e/app.po.ts b/ponyracer/e2e/app.po.ts index ff117ae89..203cd9191 100644 --- a/ponyracer/e2e/app.po.ts +++ b/ponyracer/e2e/app.po.ts @@ -1,4 +1,4 @@ -import { browser, element, by } from 'protractor'; +import { browser, by, element } from 'protractor'; export class PonyracerPage { navigateTo() { diff --git a/ponyracer/e2e/tsconfig.e2e.json b/ponyracer/e2e/tsconfig.e2e.json index ac7a37325..e2a9a2fc7 100644 --- a/ponyracer/e2e/tsconfig.e2e.json +++ b/ponyracer/e2e/tsconfig.e2e.json @@ -4,7 +4,7 @@ "outDir": "../out-tsc/e2e", "module": "commonjs", "target": "es5", - "types":[ + "types": [ "jasmine", "node" ] diff --git a/ponyracer/karma.conf.js b/ponyracer/karma.conf.js index 84b4cd5ac..4d9ab9d94 100644 --- a/ponyracer/karma.conf.js +++ b/ponyracer/karma.conf.js @@ -15,15 +15,6 @@ module.exports = function (config) { client:{ clearContext: false // leave Jasmine Spec Runner output visible in browser }, - files: [ - { pattern: './src/test.ts', watched: false } - ], - preprocessors: { - './src/test.ts': ['@angular/cli'] - }, - mime: { - 'text/x-typescript': ['ts','tsx'] - }, coverageIstanbulReporter: { reports: [ 'html', 'lcovonly' ], fixWebpackSourcePaths: true @@ -31,9 +22,7 @@ module.exports = function (config) { angularCli: { environment: 'dev' }, - reporters: config.angularCli && config.angularCli.codeCoverage - ? ['progress', 'coverage-istanbul'] - : ['progress', 'kjhtml'], + reporters: ['progress', 'kjhtml'], port: 9876, colors: true, logLevel: config.LOG_INFO, diff --git a/ponyracer/package.json b/ponyracer/package.json index 5a685ebb7..0e0d8068f 100644 --- a/ponyracer/package.json +++ b/ponyracer/package.json @@ -12,11 +12,13 @@ }, "private": true, "dependencies": { + "@angular/animations": "^4.0.0", "@angular/common": "^4.0.0", "@angular/compiler": "^4.0.0", "@angular/core": "^4.0.0", "@angular/forms": "^4.0.0", "@angular/http": "^4.0.0", + "@angular/language-service": "^4.0.0", "@angular/platform-browser": "^4.0.0", "@angular/platform-browser-dynamic": "^4.0.0", "@angular/router": "^4.0.0", @@ -25,7 +27,7 @@ "zone.js": "^0.8.4" }, "devDependencies": { - "@angular/cli": "1.1.0-beta.0", + "@angular/cli": "1.1.0-beta.1", "@angular/compiler-cli": "^4.0.0", "@angular/language-service": "^4.0.0", "@types/jasmine": "2.5.38", @@ -34,14 +36,14 @@ "jasmine-core": "~2.5.2", "jasmine-spec-reporter": "~3.2.0", "karma": "~1.4.1", - "karma-chrome-launcher": "~2.0.0", + "karma-chrome-launcher": "~2.1.1", "karma-cli": "~1.0.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", - "karma-coverage-istanbul-reporter": "^0.2.0", + "karma-coverage-istanbul-reporter": "^1.0.0", "protractor": "~5.1.0", "ts-node": "~2.0.0", "tslint": "~5.1.0", - "typescript": "~2.2.0" + "typescript": "~2.3.1" } } diff --git a/ponyracer/src/app/app.component.html b/ponyracer/src/app/app.component.html index b6931b538..d0322ef6c 100644 --- a/ponyracer/src/app/app.component.html +++ b/ponyracer/src/app/app.component.html @@ -1,3 +1,20 @@ -

- {{title}} -

+ +
+

+ Welcome to {{title}}!! +

+ +
+

Here are some links to help you start:

+ + diff --git a/ponyracer/src/app/app.component.spec.ts b/ponyracer/src/app/app.component.spec.ts index c740bcd74..7d2799ceb 100644 --- a/ponyracer/src/app/app.component.spec.ts +++ b/ponyracer/src/app/app.component.spec.ts @@ -17,16 +17,16 @@ describe('AppComponent', () => { expect(app).toBeTruthy(); })); - it(`should have as title 'app works!'`, async(() => { + it(`should have as title 'app'`, async(() => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.debugElement.componentInstance; - expect(app.title).toEqual('app works!'); + expect(app.title).toEqual('app'); })); it('should render title in a h1 tag', async(() => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('app works!'); + expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!!'); })); }); diff --git a/ponyracer/src/app/app.component.ts b/ponyracer/src/app/app.component.ts index ff63e0504..7b0f67283 100644 --- a/ponyracer/src/app/app.component.ts +++ b/ponyracer/src/app/app.component.ts @@ -6,5 +6,5 @@ import { Component } from '@angular/core'; styleUrls: ['./app.component.css'] }) export class AppComponent { - title = 'app works!'; + title = 'app'; } diff --git a/ponyracer/src/app/app.module.ts b/ponyracer/src/app/app.module.ts index 67ae49119..f65716351 100644 --- a/ponyracer/src/app/app.module.ts +++ b/ponyracer/src/app/app.module.ts @@ -1,7 +1,5 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { HttpModule } from '@angular/http'; import { AppComponent } from './app.component'; @@ -10,9 +8,7 @@ import { AppComponent } from './app.component'; AppComponent ], imports: [ - BrowserModule, - FormsModule, - HttpModule + BrowserModule ], providers: [], bootstrap: [AppComponent] diff --git a/ponyracer/src/index.html b/ponyracer/src/index.html index 6f0271512..f111e6a1b 100644 --- a/ponyracer/src/index.html +++ b/ponyracer/src/index.html @@ -9,6 +9,6 @@ - Loading... + diff --git a/ponyracer/src/polyfills.ts b/ponyracer/src/polyfills.ts index 53bdaf1b8..bc94e7a6d 100644 --- a/ponyracer/src/polyfills.ts +++ b/ponyracer/src/polyfills.ts @@ -66,3 +66,7 @@ import 'zone.js/dist/zone'; // Included with Angular CLI. * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 */ // import 'intl'; // Run `npm install --save intl`. +/** + * Need to import at least one locale-data with intl. + */ +// import 'intl/locale-data/jsonp/en'; diff --git a/ponyracer/tslint.json b/ponyracer/tslint.json index 9113f1368..dd117b387 100644 --- a/ponyracer/tslint.json +++ b/ponyracer/tslint.json @@ -3,6 +3,7 @@ "node_modules/codelyzer" ], "rules": { + "arrow-return-shorthand": true, "callable-types": true, "class-name": true, "comment-format": [ @@ -12,7 +13,10 @@ "curly": true, "eofline": true, "forin": true, - "import-blacklist": [true, "rxjs"], + "import-blacklist": [ + true, + "rxjs" + ], "import-spacing": true, "indent": [ true, @@ -42,16 +46,22 @@ ], "no-construct": true, "no-debugger": true, - "no-duplicate-variable": true, + "no-duplicate-super": true, "no-empty": false, "no-empty-interface": true, "no-eval": true, - "no-inferrable-types": [true, "ignore-params"], + "no-inferrable-types": [ + true, + "ignore-params" + ], + "no-misused-new": true, + "no-non-null-assertion": true, "no-shadowed-variable": true, "no-string-literal": false, "no-string-throw": true, "no-switch-case-fall-through": true, "no-trailing-whitespace": true, + "no-unnecessary-initializer": true, "no-unused-expression": true, "no-use-before-declare": true, "no-var-keyword": true, @@ -97,9 +107,18 @@ "check-separator", "check-type" ], - - "directive-selector": [true, "attribute", "app", "camelCase"], - "component-selector": [true, "element", "app", "kebab-case"], + "directive-selector": [ + true, + "attribute", + "app", + "camelCase" + ], + "component-selector": [ + true, + "element", + "app", + "kebab-case" + ], "use-input-property-decorator": true, "use-output-property-decorator": true, "use-host-property-decorator": true,