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
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.1",
"@angular/compiler": "2.0.1",
"@angular/core": "2.0.1",
"@angular/forms": "2.0.1",
"@angular/http": "2.0.1",
"@angular/platform-browser": "2.0.1",
"@angular/platform-browser-dynamic": "2.0.1",
"@angular/platform-server": "2.0.1",
"@angular/router": "3.0.1",
"@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 @@ -29,15 +29,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-externals-plugin": "^1.0.0",
"webpack-hot-middleware": "^2.10.0",
"webpack-hot-middleware": "^2.12.2",
"webpack-merge": "^0.14.1",
"zone.js": "^0.6.21"
"zone.js": "^0.6.25"
}
}
4 changes: 2 additions & 2 deletions templates/Angular2Spa/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var sharedConfig = {

// Configuration for client-side bundle suitable for running in browsers
var clientBundleConfig = merge(sharedConfig, {
entry: { 'main-client': './ClientApp/boot-client.ts' },
entry: { 'main-client': './ClientApp/main-client.ts' },
output: { path: path.join(__dirname, './wwwroot/dist') },
devtool: isDevBuild ? 'inline-source-map' : null,
plugins: [
Expand All @@ -41,7 +41,7 @@ var clientBundleConfig = merge(sharedConfig, {

// Configuration for server-side (prerendering) bundle suitable for running in Node
var serverBundleConfig = merge(sharedConfig, {
entry: { 'main-server': './ClientApp/boot-server.ts' },
entry: { 'main-server': './ClientApp/main-server.ts' },
Copy link
Member

Choose a reason for hiding this comment

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

Let's keep renaming separate from this PR. Can you revert the names?

Copy link
Contributor Author

@MarkPieszak MarkPieszak Oct 5, 2016

Choose a reason for hiding this comment

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

It was breaking since webpack (#363) is looking for a file by that name, want me to change it there instead? @SteveSandersonMS

output: {
libraryTarget: 'commonjs',
path: path.join(__dirname, './ClientApp/dist')
Expand Down
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,23 +2,32 @@
"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",
"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