From 69ae63c4b1d525936c1e445320258b79bd64efca Mon Sep 17 00:00:00 2001 From: Filipe Silva Date: Wed, 14 Sep 2016 18:15:51 +0100 Subject: [PATCH] chore: update examples to TS2.0 (#2329) --- public/docs/_examples/_protractor/package.json | 4 +++- public/docs/_examples/homepage-hello-world/ts/index.1.html | 2 +- public/docs/_examples/homepage-tabs/ts/index.1.html | 2 +- public/docs/_examples/homepage-todo/ts/index.1.html | 2 +- public/docs/_examples/package.json | 5 +++-- public/docs/_examples/quickstart/ts/package.1.json | 2 +- .../style-guide/ts/05-15/app/heroes/shared/hero.service.ts | 2 +- .../ts/05-17/app/heroes/hero-list/hero-list.component.ts | 2 +- .../style-guide/ts/07-03/app/heroes/shared/hero.service.ts | 2 +- .../style-guide/ts/07-04/app/heroes/shared/hero.service.ts | 2 +- public/docs/_examples/systemjs.config.plunker.build.js | 2 +- public/docs/_examples/systemjs.config.plunker.js | 2 +- public/docs/_examples/webpack/ts/config/webpack.common.js | 2 +- public/docs/_examples/webpack/ts/config/webpack.test.js | 2 +- public/docs/_examples/webpack/ts/package.webpack.json | 3 ++- 15 files changed, 20 insertions(+), 16 deletions(-) diff --git a/public/docs/_examples/_protractor/package.json b/public/docs/_examples/_protractor/package.json index eca5cae41f..1e12742c38 100644 --- a/public/docs/_examples/_protractor/package.json +++ b/public/docs/_examples/_protractor/package.json @@ -13,7 +13,9 @@ "license": "ISC", "devDependencies": { "protractor": "^3.3.0", - "typings": "^1.0.4" + "typings": "^1.0.4", + "ts-node": "^1.3.0", + "typescript": "^2.0.2" }, "repository": {} } diff --git a/public/docs/_examples/homepage-hello-world/ts/index.1.html b/public/docs/_examples/homepage-hello-world/ts/index.1.html index 8b812feb4a..9ae387ee57 100644 --- a/public/docs/_examples/homepage-hello-world/ts/index.1.html +++ b/public/docs/_examples/homepage-hello-world/ts/index.1.html @@ -14,7 +14,7 @@ - + diff --git a/public/docs/_examples/homepage-tabs/ts/index.1.html b/public/docs/_examples/homepage-tabs/ts/index.1.html index 13e82eaf7c..f714094eb7 100644 --- a/public/docs/_examples/homepage-tabs/ts/index.1.html +++ b/public/docs/_examples/homepage-tabs/ts/index.1.html @@ -15,7 +15,7 @@ - + diff --git a/public/docs/_examples/homepage-todo/ts/index.1.html b/public/docs/_examples/homepage-todo/ts/index.1.html index ab18c9c9d9..8f9ecc9d8c 100644 --- a/public/docs/_examples/homepage-todo/ts/index.1.html +++ b/public/docs/_examples/homepage-todo/ts/index.1.html @@ -15,7 +15,7 @@ - + diff --git a/public/docs/_examples/package.json b/public/docs/_examples/package.json index 314a60f8cd..395c180cce 100644 --- a/public/docs/_examples/package.json +++ b/public/docs/_examples/package.json @@ -51,6 +51,7 @@ "devDependencies": { "angular-cli": "^1.0.0-beta.5", "angular2-template-loader": "^0.4.0", + "awesome-typescript-loader": "^2.2.4", "canonical-path": "0.0.2", "concurrently": "^2.2.0", "css-loader": "^0.23.1", @@ -79,9 +80,9 @@ "rollup-plugin-commonjs": "^4.1.0", "style-loader": "^0.13.1", "ts-loader": "^0.8.2", - "ts-node": "^0.7.3", + "ts-node": "^1.3.0", "tslint": "^3.15.1", - "typescript": "2.0.2", + "typescript": "^2.0.2", "typings": "^1.3.2", "webpack": "^1.13.0", "webpack-dev-server": "^1.14.1", diff --git a/public/docs/_examples/quickstart/ts/package.1.json b/public/docs/_examples/quickstart/ts/package.1.json index 63ed5ad377..36ebaf3119 100644 --- a/public/docs/_examples/quickstart/ts/package.1.json +++ b/public/docs/_examples/quickstart/ts/package.1.json @@ -33,7 +33,7 @@ "devDependencies": { "concurrently": "^2.2.0", "lite-server": "^2.2.2", - "typescript": "^1.8.10", + "typescript": "^2.0.2", "typings":"^1.3.2" } } diff --git a/public/docs/_examples/style-guide/ts/05-15/app/heroes/shared/hero.service.ts b/public/docs/_examples/style-guide/ts/05-15/app/heroes/shared/hero.service.ts index f8690e9c2f..3f83d92fe8 100644 --- a/public/docs/_examples/style-guide/ts/05-15/app/heroes/shared/hero.service.ts +++ b/public/docs/_examples/style-guide/ts/05-15/app/heroes/shared/hero.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs/Rx'; -import { Hero } from './hero.model.ts'; +import { Hero } from './hero.model'; @Injectable() export class HeroService { diff --git a/public/docs/_examples/style-guide/ts/05-17/app/heroes/hero-list/hero-list.component.ts b/public/docs/_examples/style-guide/ts/05-17/app/heroes/hero-list/hero-list.component.ts index b8ebd4cc46..5f18cc5b0c 100644 --- a/public/docs/_examples/style-guide/ts/05-17/app/heroes/hero-list/hero-list.component.ts +++ b/public/docs/_examples/style-guide/ts/05-17/app/heroes/hero-list/hero-list.component.ts @@ -2,7 +2,7 @@ // #docregion import { Component } from '@angular/core'; -import { Hero } from '../shared/hero.model.ts'; +import { Hero } from '../shared/hero.model'; // #docregion example @Component({ diff --git a/public/docs/_examples/style-guide/ts/07-03/app/heroes/shared/hero.service.ts b/public/docs/_examples/style-guide/ts/07-03/app/heroes/shared/hero.service.ts index f8690e9c2f..3f83d92fe8 100644 --- a/public/docs/_examples/style-guide/ts/07-03/app/heroes/shared/hero.service.ts +++ b/public/docs/_examples/style-guide/ts/07-03/app/heroes/shared/hero.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs/Rx'; -import { Hero } from './hero.model.ts'; +import { Hero } from './hero.model'; @Injectable() export class HeroService { diff --git a/public/docs/_examples/style-guide/ts/07-04/app/heroes/shared/hero.service.ts b/public/docs/_examples/style-guide/ts/07-04/app/heroes/shared/hero.service.ts index f8690e9c2f..3f83d92fe8 100644 --- a/public/docs/_examples/style-guide/ts/07-04/app/heroes/shared/hero.service.ts +++ b/public/docs/_examples/style-guide/ts/07-04/app/heroes/shared/hero.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs/Rx'; -import { Hero } from './hero.model.ts'; +import { Hero } from './hero.model'; @Injectable() export class HeroService { diff --git a/public/docs/_examples/systemjs.config.plunker.build.js b/public/docs/_examples/systemjs.config.plunker.build.js index ea4ccf95ec..5334adf005 100644 --- a/public/docs/_examples/systemjs.config.plunker.build.js +++ b/public/docs/_examples/systemjs.config.plunker.build.js @@ -53,7 +53,7 @@ 'rxjs': 'npm:rxjs', 'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api', 'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js', - 'typescript': 'npm:typescript@1.9.0-dev.20160409/lib/typescript.js', + 'typescript': 'npm:typescript@2.0.2/lib/typescript.js', }, // packages tells the System loader how to load when no filename and/or no extension diff --git a/public/docs/_examples/systemjs.config.plunker.js b/public/docs/_examples/systemjs.config.plunker.js index 56c6fc54cf..26b8a17aab 100644 --- a/public/docs/_examples/systemjs.config.plunker.js +++ b/public/docs/_examples/systemjs.config.plunker.js @@ -40,7 +40,7 @@ 'rxjs': 'npm:rxjs', 'angular2-in-memory-web-api': 'npm:angular2-in-memory-web-api', 'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js', - 'typescript': 'npm:typescript@1.9.0-dev.20160409/lib/typescript.js', + 'typescript': 'npm:typescript@2.0.2/lib/typescript.js', }, // packages tells the System loader how to load when no filename and/or no extension diff --git a/public/docs/_examples/webpack/ts/config/webpack.common.js b/public/docs/_examples/webpack/ts/config/webpack.common.js index 5de5af96d2..b707349719 100644 --- a/public/docs/_examples/webpack/ts/config/webpack.common.js +++ b/public/docs/_examples/webpack/ts/config/webpack.common.js @@ -24,7 +24,7 @@ module.exports = { loaders: [ { test: /\.ts$/, - loaders: ['ts', 'angular2-template-loader'] + loaders: ['awesome-typescript-loader', 'angular2-template-loader'] }, { test: /\.html$/, diff --git a/public/docs/_examples/webpack/ts/config/webpack.test.js b/public/docs/_examples/webpack/ts/config/webpack.test.js index 147c94dfcd..c3f8727e70 100644 --- a/public/docs/_examples/webpack/ts/config/webpack.test.js +++ b/public/docs/_examples/webpack/ts/config/webpack.test.js @@ -12,7 +12,7 @@ module.exports = { loaders: [ { test: /\.ts$/, - loaders: ['ts', 'angular2-template-loader'] + loaders: ['awesome-typescript-loader', 'angular2-template-loader'] }, { test: /\.html$/, diff --git a/public/docs/_examples/webpack/ts/package.webpack.json b/public/docs/_examples/webpack/ts/package.webpack.json index 73ab0765d3..86f9c31338 100644 --- a/public/docs/_examples/webpack/ts/package.webpack.json +++ b/public/docs/_examples/webpack/ts/package.webpack.json @@ -24,6 +24,7 @@ }, "devDependencies": { "angular2-template-loader": "^0.4.0", + "awesome-typescript-loader": "^2.2.4", "css-loader": "^0.23.1", "extract-text-webpack-plugin": "^1.0.1", "file-loader": "^0.8.5", @@ -41,7 +42,7 @@ "rimraf": "^2.5.2", "style-loader": "^0.13.1", "ts-loader": "^0.8.1", - "typescript": "^1.8.10", + "typescript": "^2.0.2", "typings": "^1.3.2", "webpack": "^1.13.0", "webpack-dev-server": "^1.14.1",