Skip to content
This repository has been archived by the owner on Apr 8, 2020. It is now read-only.

Update all projects to TypeScript 2.0 - remove typings - etc #362

Closed
wants to merge 12 commits into from
Closed
40 changes: 20 additions & 20 deletions templates/Angular2Spa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
"name": "Angular2Spa",
"version": "0.0.0",
"dependencies": {
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/platform-server": "2.0.0",
"@angular/router": "3.0.0",
"@types/node": "^6.0.38",
"angular2-platform-node": "~2.0.10",
"angular2-universal": "~2.0.10",
"angular2-universal-polyfills": "~2.0.10",
"aspnet-prerendering": "^1.0.6",
"aspnet-webpack": "^1.0.11",
"@angular/common": "2.0.2",
"@angular/compiler": "2.0.2",
"@angular/core": "2.0.2",
"@angular/forms": "2.0.2",
"@angular/http": "2.0.2",
"@angular/platform-browser": "2.0.2",
"@angular/platform-browser-dynamic": "2.0.2",
"@angular/platform-server": "2.0.2",
"@angular/router": "3.0.2",
"@types/node": "^6.0.42",
"angular2-platform-node": "~2.0.11",
"angular2-universal": "~2.0.11",
"angular2-universal-polyfills": "~2.0.11",
"aspnet-prerendering": "^1.0.7",
"aspnet-webpack": "^1.0.17",
"bootstrap": "^3.3.7",
"css": "^2.2.1",
"css-loader": "^0.25.0",
Expand All @@ -30,15 +30,15 @@
"preboot": "^4.5.2",
"raw-loader": "^0.5.1",
"rxjs": "5.0.0-beta.12",
"style-loader": "^0.13.0",
"style-loader": "^0.13.1",
"to-string-loader": "^1.1.5",
"ts-loader": "^0.8.2",
"typescript": "^2.0.0",
"typescript": "^2.0.3",
"url-loader": "^0.5.7",
"webpack": "^1.12.14",
"webpack": "^1.13.2",
"webpack-hot-middleware": "^2.12.2",
"webpack-node-externals": "^1.4.3",
"webpack-hot-middleware": "^2.10.0",
"webpack-merge": "^0.14.1",
"zone.js": "^0.6.21"
"zone.js": "^0.6.25"
}
}
2 changes: 1 addition & 1 deletion templates/KnockoutSpa/ClientApp/boot.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import './css/site.css';
import * as ko from 'knockout';
import { createHistory } from 'history';
import './webpack-component-loader';
import AppRootComponent from './components/app-root/app-root';
const createHistory = require('history').createBrowserHistory

// Load and register the <app-root> component
ko.components.register('app-root', AppRootComponent);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AppRootViewModel {
public route: KnockoutObservable<Route>;
private _router: Router;

constructor(params: { history: HistoryModule.History }) {
constructor(params: { history: History.History }) {
// Activate the client-side router
this._router = new Router(params.history, routes)
this.route = this._router.currentRoute;
Expand All @@ -40,4 +40,4 @@ class AppRootViewModel {
}
}

export default { viewModel: AppRootViewModel, template: require('./app-root.html') };
export default { viewModel: AppRootViewModel, template: require('./app-root.html') };
2 changes: 1 addition & 1 deletion templates/KnockoutSpa/ClientApp/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class Router {
private disposeHistory: () => void;
private clickEventListener: EventListener;

constructor(history: HistoryModule.History, routes: Route[]) {
constructor(history: History.History, routes: Route[]) {
// Reset and configure Crossroads so it matches routes and updates this.currentRoute
crossroads.removeAllRoutes();
crossroads.resetState();
Expand Down
27 changes: 18 additions & 9 deletions templates/KnockoutSpa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,33 @@
"name": "WebApplicationBasic",
"version": "0.0.0",
"devDependencies": {
"aspnet-webpack": "^1.0.6",
"@types/core-js": "^0.9.34",
"@types/crossroads": "0.0.29",
"@types/history": "^2.0.38",
"@types/jquery": "^2.0.32",
"@types/knockout": "^3.4.35",
"@types/react-router": "^2.0.37",
"@types/requirejs": "^2.1.26",
"@types/signals": "0.0.16",
"@types/whatwg-fetch": "0.0.30",
"aspnet-webpack": "^1.0.17",
"bootstrap": "^3.3.6",
"bundle-loader": "^0.5.4",
"crossroads": "^0.12.2",
"css-loader": "^0.23.1",
"css-loader": "^0.25.0",
"event-source-polyfill": "^0.0.7",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.8.5",
"history": "^2.0.1",
"file-loader": "^0.9.0",
"history": "^4.3.0",
"isomorphic-fetch": "^2.2.1",
"jquery": "^2.2.1",
"knockout": "^3.4.0",
"raw-loader": "^0.5.1",
"style-loader": "^0.13.0",
"ts-loader": "^0.8.1",
"typescript": "^1.8.2",
"style-loader": "^0.13.1",
"ts-loader": "^0.8.2",
"typescript": "^2.0.3",
"url-loader": "^0.5.7",
"webpack": "^1.12.14",
"webpack-hot-middleware": "^2.10.0"
"webpack": "^1.13.2",
"webpack-hot-middleware": "^2.12.2"
}
}
6 changes: 5 additions & 1 deletion templates/KnockoutSpa/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
"moduleResolution": "node",
"target": "es5",
"sourceMap": true,
"skipDefaultLibCheck": true
"skipDefaultLibCheck": true,
"types": ["core-js", "crossroads", "history", "knockout",
"requirejs", "signals", "whatwg-fetch" ]
},
"compileOnSave": false,
"buildOnSave": false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these two lines really needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are just helpful depending on certain IDE's to disable automatic tsc compilation / etc.
Do you want me to remove them? Just thought they were helpful to ensure webpack handles everything.

Copy link
Contributor

@stephtr stephtr Oct 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are they only in one template and not all? (As far as I know the default value of buildOnSave is already false.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have removed them

"exclude": [
"bin",
"node_modules"
Expand Down
36 changes: 0 additions & 36 deletions templates/KnockoutSpa/tsd.json

This file was deleted.

Loading