From 12b047a0f8a83a0dc18e8385eaf054a8f9eade7f Mon Sep 17 00:00:00 2001 From: Mopar Date: Wed, 19 Apr 2017 07:08:15 -0500 Subject: [PATCH] Upgrading Angular to version 4.0.2, as well as a few other packages. --- README.md | 8 ++++---- config/tsconfig.json | 6 +++--- config/webpack.common.js | 10 ++++++---- config/webpack.test.js | 10 ++++++---- package.json | 37 ++++++++++++++++++------------------- src/polyfills.ts | 10 +--------- 6 files changed, 38 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 6262fdb..7193eda 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -## Angular2 Seed Project +## Angular 4 Seed Project -A basic Angular2 seed project utilizing the following technologies: +A basic Angular 4 seed project utilizing the following technologies: -* Angular 2.4.5 -* TypeScript 2+ +* Angular 4.0.2 +* TypeScript 2.2 * Karma/Jasmine (unit testing) * Codelyzer & TSLint (code linting) * PugJS (template engine) diff --git a/config/tsconfig.json b/config/tsconfig.json index e40072b..66b7a85 100644 --- a/config/tsconfig.json +++ b/config/tsconfig.json @@ -11,12 +11,12 @@ "suppressImplicitAnyIndexErrors": true, "typeRoots": [ "../node_modules/@types" - ], - "types": [ - "node", "jasmine" ] }, "exclude": [ "../node_modules" + ], + "include": [ + "../**/*" ] } \ No newline at end of file diff --git a/config/webpack.common.js b/config/webpack.common.js index ddf735a..4714d0e 100644 --- a/config/webpack.common.js +++ b/config/webpack.common.js @@ -28,7 +28,7 @@ module.exports = { }, { test: /\.pug$/, - use: "pug-html-loader" + use: [ "raw-loader", "pug-html-loader" ] }, { test: /\.scss$/, @@ -63,9 +63,11 @@ module.exports = { // Workaround for Angular-SystemJS-Webpack(2) WARNINGS new webpack.ContextReplacementPlugin( - /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/, - helpers.root("src"), - {} + /angular(\\|\/)core(\\|\/)@angular/, + helpers.root('src'), // location of your src + { + // your Angular Async Route paths relative to this root directory + } ) ] }; \ No newline at end of file diff --git a/config/webpack.test.js b/config/webpack.test.js index 5ee8bc1..c7388a3 100644 --- a/config/webpack.test.js +++ b/config/webpack.test.js @@ -20,7 +20,7 @@ module.exports = { }, { test: /\.pug$/, - use: "pug-html-loader" + use: [ "raw-loader", "pug-html-loader" ] }, { test: /\.scss$/, @@ -47,9 +47,11 @@ module.exports = { plugins: [ // Workaround for Angular-SystemJS-Webpack(2) WARNINGS new webpack.ContextReplacementPlugin( - /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/, - helpers.root("src"), - {} + /angular(\\|\/)core(\\|\/)@angular/, + helpers.root('src'), // location of your src + { + // your Angular Async Route paths relative to this root directory + } ) ] }; \ No newline at end of file diff --git a/package.json b/package.json index 17b859f..acf5c37 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "angular-seed", - "version": "1.0.0-beta.0", - "description": "Angular 2 Seed", + "version": "1.1.0", + "description": "Angular Seed", "license": "GPL-3.0", "repository": { "type": "GIT", @@ -15,23 +15,23 @@ "build": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail" }, "dependencies": { - "@angular/common": "2.4.5", - "@angular/compiler": "2.4.5", - "@angular/core": "2.4.5", - "@angular/forms": "2.4.5", - "@angular/http": "2.4.5", - "@angular/platform-browser": "2.4.5", - "@angular/platform-browser-dynamic": "2.4.5", - "@angular/router": "3.4.5", + "@angular/common": "^4.0.2", + "@angular/compiler": "^4.0.2", + "@angular/core": "^4.0.2", + "@angular/forms": "^4.0.2", + "@angular/http": "^4.0.2", + "@angular/platform-browser": "^4.0.2", + "@angular/platform-browser-dynamic": "^4.0.2", + "@angular/router": "^4.0.2", "core-js": "^2.4.1", - "rxjs": "5.0.1", - "zone.js": "^0.7.2" + "rxjs": "^5.1.0", + "zone.js": "^0.8.4" }, "devDependencies": { "@types/jasmine": "^2.5.38", "@types/node": "^6.0.46", "angular2-template-loader": "^0.4.0", - "codelyzer": "2.0.0-beta.4", + "codelyzer": "~2.0.0", "copy-webpack-plugin": "^4.0.1", "css-loader": "^0.23.1", "extract-text-webpack-plugin": "^2.0.0-beta.5", @@ -48,17 +48,16 @@ "node-sass": "^3.10.0", "null-loader": "^0.1.1", "phantomjs-prebuilt": "^2.1.7", - "pug": "^2.0.0-beta6", - "pug-html-loader": "^1.0.8", - "pug-loader": "^2.3.0", + "pug": "^2.0.0-beta12", + "pug-html-loader": "^1.1.4", "raw-loader": "^0.5.1", "reflect-metadata": "^0.1.8", "rimraf": "^2.5.2", "sass-loader": "^4.0.2", "style-loader": "^0.13.1", - "ts-loader": "~1.3.3", - "tslint": "4.0.2", - "typescript": "2.0.10", + "ts-loader": "~2.0.3", + "tslint": "~4.5.0", + "typescript": "~2.2.0", "webpack": "~2.2.0", "webpack-dev-server": "~2.2.0", "webpack-merge": "~2.4.0" diff --git a/src/polyfills.ts b/src/polyfills.ts index 95b11b0..53e5d82 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -1,11 +1,3 @@ import "core-js/es6"; import "core-js/es7/reflect"; -require("zone.js/dist/zone"); - -if(process.env.ENV === "production") { - // Production -} else { - // Development - Error["stackTraceLimit"] = Infinity; - require("zone.js/dist/long-stack-trace-zone"); -} \ No newline at end of file +require("zone.js/dist/zone"); \ No newline at end of file