From a1e504c56c173e2556874148c0753455760f973d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Mon, 1 Aug 2016 21:22:02 +0300 Subject: [PATCH 01/67] chore: update hmr --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cebc0563..89a8b901 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ }, "devDependencies": { "@angularclass/hmr": "^1.0.1", - "@angularclass/hmr-loader": "^1.0.0", + "@angularclass/hmr-loader": "^3.0.2", "@types/core-js": "^0.9.0", "@types/jasmine": "^2.2.29", "@types/node": "^6.0.38", From c248fed8ab03f0de65d752e4ad0905df685b5f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Sat, 20 Aug 2016 14:05:00 +0200 Subject: [PATCH 02/67] chore: update README Fixes #142 --- README.md | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 214ae500..10ea047a 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,9 @@ go to [http://localhost:8080](http://localhost:8080) in your browser. * [Getting Started](#getting-started) * [Dependencies](#dependencies) * [Installing](#installing) - * [Running the app](#running-the-app) * [Developing](#developing) * [Testing](#testing) + * [Production](#production) * [Documentation](#documentation) * [Frequently asked questions](#faq) * [TypeScript](#typescript) @@ -67,22 +67,13 @@ What you need to run this app: * `clone` your fork * `npm install` to install all dependencies -## Running the app - -After you have installed all dependencies you can now run the app with: - -```bash -npm start -``` - -It will start a local server using `webpack-dev-server` which will watch, build (in-memory), and reload for you. The port will be displayed to you as `http://localhost:8080`. - ## Developing -### Build files +After you have installed all dependencies you can now start developing with: + +* `npm start` -* single run: `npm run build` -* build files and watch: `npm run watch` +It will start a local server using `webpack-dev-server` which will watch, build (in-memory), and reload for you. The application can be checked at `http://localhost:8080`. ## Testing @@ -102,12 +93,19 @@ It will start a local server using `webpack-dev-server` which will watch, build * when debugging or first writing test suites, you may find it helpful to try out Protractor commands without starting up the entire test suite. You can do this with the element explorer. * you can learn more about [Protractor Interactive Mode here](https://github.com/angular/protractor/blob/master/docs/debugging.md#testing-out-protractor-interactively) +## Production + +To build your application, run: + +* `npm run build` + +You can now go to `/dist` and deploy that to your server! + ## Documentation You can generate api docs (using [TypeDoc](http://typedoc.io/)) for your code with the following: -```bash -npm run docs -``` + +* `npm run docs` # FAQ @@ -124,7 +122,7 @@ It's simple, just install the lib via npm and import it in your code when you ne Just install the lib and import the css files in [vendor.ts](https://github.com/preboot/angular2-webpack/blob/master/src/vendor.ts). For example this is how to do it with bootstrap: ```sh -npm install bootstrap@4.0.0 --save +npm install bootstrap@next --save ``` And in [vendor.ts](https://github.com/preboot/angular2-webpack/blob/master/src/vendor.ts) add the following: From 5eecf83b74a8659658605d9a927288d0dafc3613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Sat, 20 Aug 2016 14:17:30 +0200 Subject: [PATCH 03/67] chore: leaves ejs as the default index.html loader Fixes #141 --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 16be247b..61745528 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -124,7 +124,7 @@ module.exports = function makeWebpackConfig() { // support for .html as raw text // todo: change the loader to something that adds a hash to images - {test: /\.html$/, loader: 'raw'} + {test: /\.html$/, loader: 'raw', exclude: root('src', 'public')} ], postLoaders: [] }; From fa0a32754cd94d74a3ad64ddabf1ea82b3c5e4bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Sat, 20 Aug 2016 23:43:08 +0200 Subject: [PATCH 04/67] chore: add gitter channel --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 10ea047a..7649301a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # angular2-webpack [![Dependency Status](https://david-dm.org/preboot/angular2-webpack/status.svg)](https://david-dm.org/preboot/angular2-webpack#info=dependencies) [![devDependency Status](https://david-dm.org/preboot/angular2-webpack/dev-status.svg)](https://david-dm.org/preboot/angular2-webpack#info=devDependencies) +[![Join the chat at https://gitter.im/preboot/angular2-webpack](https://badges.gitter.im/preboot/angular2-webpack.svg)](https://gitter.im/preboot/angular2-webpack?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) **Note: This guide is following the Angular's [Style Guide](http://angular.io/styleguide) so I will be changing conventions here and there eventually. You are free to use your own conventions with this starter.** **Note 2: There is no conventions yet for RC5 on the style guide so there will be a future update here for that.** From aeb1bcb0413618cee8df947cf4070298c9d451a7 Mon Sep 17 00:00:00 2001 From: Jay Kan Date: Tue, 23 Aug 2016 05:09:04 -0700 Subject: [PATCH 05/67] docs: correct comment (#147) Remove `rootDir()` out of top comment since we only have root() helper function --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 61745528..7728e239 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,4 @@ -// Helper: root(), and rootDir() are defined at the bottom +// Helper: root() is defined at the bottom var path = require('path'); var webpack = require('webpack'); From 2c65f3a16e7cc8b1b16558471d4dfbbf1ffea9f1 Mon Sep 17 00:00:00 2001 From: PatrickJS Date: Tue, 23 Aug 2016 05:15:39 -0700 Subject: [PATCH 06/67] feat: @angularclass/hmr (#146) --- package.json | 3 +++ src/app/app.module.ts | 23 +++++++++++++++++++++-- src/main.ts | 11 +++++++++-- webpack.config.js | 2 +- 4 files changed, 34 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 02e56ef3..bbe08094 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "ci": "npm run e2e && npm run test", "docs": "typedoc --options typedoc.json src/app/app.component.ts", "start": "npm run server", + "start:hmr": "npm run server -- --hot", "postinstall": "npm run webdriver-update && typings install" }, "dependencies": { @@ -37,6 +38,8 @@ "zone.js": "^0.6.12" }, "devDependencies": { + "@angularclass/hmr": "^1.0.1", + "@angularclass/hmr-loader": "^1.0.0", "angular2-template-loader": "^0.4.0", "autoprefixer": "^6.3.2", "codelyzer": "0.0.26", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 2ed84ed4..cea4ed87 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,4 +1,4 @@ -import { NgModule } from '@angular/core'; +import { NgModule, ApplicationRef } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { HttpModule } from '@angular/http'; import { FormsModule } from '@angular/forms'; @@ -9,6 +9,8 @@ import { AboutComponent } from './about/about.component'; import { ApiService } from './shared'; import { routing } from './app.routing'; +import { removeNgStyles, createNewHosts } from '@angularclass/hmr'; + @NgModule({ imports: [ BrowserModule, @@ -26,4 +28,21 @@ import { routing } from './app.routing'; ], bootstrap: [AppComponent] }) -export class AppModule {} +export class AppModule { + constructor(public appRef: ApplicationRef) {} + hmrOnInit(store) { + console.log('HMR store', store); + } + hmrOnDestroy(store) { + let cmpLocation = this.appRef.components.map(cmp => cmp.location.nativeElement); + // recreate elements + store.disposeOldHosts = createNewHosts(cmpLocation); + // remove styles + removeNgStyles(); + } + hmrAfterDestroy(store) { + // display new elements + store.disposeOldHosts(); + delete store.disposeOldHosts; + } +} diff --git a/src/main.ts b/src/main.ts index 5d247cbf..affe5e70 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,6 +1,5 @@ import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - import { AppModule } from './app/app.module'; // depending on the env mode, enable prod mode or add debugging modules @@ -8,4 +7,12 @@ if (process.env.ENV === 'build') { enableProdMode(); } -platformBrowserDynamic().bootstrapModule(AppModule); +export function main() { + return platformBrowserDynamic().bootstrapModule(AppModule); +} + +if (document.readyState === 'complete') { + main(); +} else { + document.addEventListener('DOMContentLoaded', main); +} diff --git a/webpack.config.js b/webpack.config.js index 7728e239..18416561 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -87,7 +87,7 @@ module.exports = function makeWebpackConfig() { // Support for .ts files. { test: /\.ts$/, - loaders: ['ts', 'angular2-template-loader'], + loaders: ['ts', 'angular2-template-loader', '@angularclass/hmr-loader'], exclude: [isTest ? /\.(e2e)\.ts$/ : /\.(spec|e2e)\.ts$/, /node_modules\/(?!(ng2-.+))/] }, From 8818026a7a392541e7282a85091a5c515e6b6dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Tue, 23 Aug 2016 19:23:44 +0300 Subject: [PATCH 07/67] chore: add HMR instructions to the README --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 7649301a..f9f741fe 100644 --- a/README.md +++ b/README.md @@ -76,6 +76,12 @@ After you have installed all dependencies you can now start developing with: It will start a local server using `webpack-dev-server` which will watch, build (in-memory), and reload for you. The application can be checked at `http://localhost:8080`. +As an alternative, you can work using Hot Module Replacement (HMR): + +* `npm run start:hmr` + +And you are all set! You can now modify your components on the fly without having to reload the entire page. + ## Testing #### 1. Unit Tests From 93ff9b4a73de6f4f3cdd895ac437621a6dc62f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Wed, 24 Aug 2016 12:45:45 +0200 Subject: [PATCH 08/67] chore: add hmr to vendors bundle --- src/vendor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vendor.ts b/src/vendor.ts index 145acab1..8871b0e3 100644 --- a/src/vendor.ts +++ b/src/vendor.ts @@ -6,8 +6,8 @@ import '@angular/common'; import '@angular/http'; import '@angular/router'; -// RxJS import 'rxjs'; +import '@angularclass/hmr'; // Other vendors for example jQuery, Lodash or Bootstrap // You can import js, ts, css, sass, ... From 42489ef512a5609e3e5a9a97e2fed628cc35fee5 Mon Sep 17 00:00:00 2001 From: Wesley Cho Date: Thu, 25 Aug 2016 17:38:45 -0700 Subject: [PATCH 09/67] feat(es6): change to core-js (#154) - Change ES6 polyfill to core-js --- package.json | 2 +- src/polyfills.ts | 2 +- typings.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index bbe08094..4110e840 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@angular/platform-browser": "2.0.0-rc.5", "@angular/platform-browser-dynamic": "2.0.0-rc.5", "@angular/router": "3.0.0-rc.1", - "es6-shim": "^0.35.0", + "core-js": "^2.4.1", "reflect-metadata": "0.1.3", "rxjs": "5.0.0-beta.6", "zone.js": "^0.6.12" diff --git a/src/polyfills.ts b/src/polyfills.ts index 02c74ac8..22b3edc9 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -1,4 +1,4 @@ -import 'es6-shim'; +import 'core-js/es6/shim'; import 'reflect-metadata'; require('zone.js/dist/zone'); diff --git a/typings.json b/typings.json index a12608f1..24c71d59 100644 --- a/typings.json +++ b/typings.json @@ -3,7 +3,7 @@ "jasmine": "registry:dt/jasmine#2.2.0+20160412134438" }, "globalDependencies": { - "es6-shim": "registry:dt/es6-shim#0.31.2+20160317120654", + "core-js": "registry:dt/core-js#0.0.0+20160725163759", "node": "registry:dt/node#4.0.0+20160501135006" } } From 528a2d06bd4e8cc3ef3fe5e4ad402fcfde300680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Fri, 26 Aug 2016 03:01:29 +0200 Subject: [PATCH 10/67] chore: it is client and not es6 --- src/polyfills.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/polyfills.ts b/src/polyfills.ts index 22b3edc9..9e174ed5 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -1,4 +1,4 @@ -import 'core-js/es6/shim'; +import 'core-js/client/shim'; import 'reflect-metadata'; require('zone.js/dist/zone'); From e416fd2008e23981cfc1856846d7fdda2d37c703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Fri, 26 Aug 2016 16:08:16 +0200 Subject: [PATCH 11/67] chore: update to latest zone.js Fixes #157 --- karma-shim.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/karma-shim.js b/karma-shim.js index 6ec3c8c5..c1a8f62b 100644 --- a/karma-shim.js +++ b/karma-shim.js @@ -6,10 +6,12 @@ require('reflect-metadata'); require('ts-helpers'); require('zone.js/dist/zone'); +require('zone.js/dist/long-stack-trace-zone'); +require('zone.js/dist/proxy'); +require('zone.js/dist/sync-test'); +require('zone.js/dist/jasmine-patch'); require('zone.js/dist/async-test'); require('zone.js/dist/fake-async-test'); -require('zone.js/dist/sync-test'); -require('zone.js/dist/proxy-zone'); /* Ok, this is kinda crazy. We can use the the context method on From 2c613eb1298e26ed4d3c1d9761e8c694260cadbb Mon Sep 17 00:00:00 2001 From: Francesco Soncina Date: Sun, 28 Aug 2016 14:01:43 +0200 Subject: [PATCH 12/67] add webpack-dashboard, fixes #138 (#152) --- package.json | 3 ++- webpack.config.js | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4110e840..7b6787a4 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "clean-start": "npm run clean-install && npm start", "watch": "webpack --watch --progress --profile", "build": "rimraf dist && webpack --progress --profile --bail", - "server": "webpack-dev-server --inline --progress --port 8080", + "server": "webpack-dashboard -- webpack-dev-server --inline --progress --port 8080", "webdriver-update": "webdriver-manager update", "webdriver-start": "webdriver-manager start", "lint": "tslint --force \"src/**/*.ts\"", @@ -82,6 +82,7 @@ "typings": "^1.0.4", "url-loader": "^0.5.6", "webpack": "^1.12.13", + "webpack-dashboard": "^0.1.8", "webpack-dev-server": "^1.14.1" } } diff --git a/webpack.config.js b/webpack.config.js index 18416561..1a6248c7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,6 +8,7 @@ var autoprefixer = require('autoprefixer'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var CopyWebpackPlugin = require('copy-webpack-plugin'); +var DashboardPlugin = require('webpack-dashboard/plugin'); /** * Env @@ -164,6 +165,10 @@ module.exports = function makeWebpackConfig() { }) ]; + if (!isTest && !isProd) { + config.plugins.push(new DashboardPlugin()); + } + if (!isTest) { config.plugins.push( // Generate common chunks if necessary From b7c7b25a86e96b22a6eaca09f58a32f340a65b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Sun, 28 Aug 2016 14:07:36 +0200 Subject: [PATCH 13/67] chore: swap es6-shim to core-js in tests --- karma-shim.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/karma-shim.js b/karma-shim.js index c1a8f62b..def06d7c 100644 --- a/karma-shim.js +++ b/karma-shim.js @@ -1,6 +1,6 @@ Error.stackTraceLimit = Infinity; -require('es6-shim'); +require('core-js/client/shim'); require('reflect-metadata'); require('ts-helpers'); From c35fe6a0878b0eb45f7624a4dea0668f39e8f153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Mon, 29 Aug 2016 23:20:01 +0200 Subject: [PATCH 14/67] fix typo on header in the README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f9f741fe..c79ca104 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,7 @@ No, Webpack will add all the needed Javascript bundles as script tags and all th It's simple, just install the lib via npm and import it in your code when you need it. Don't forget that you need to configure some external libs in the [bootstrap](https://github.com/preboot/angular2-webpack/blob/master/src/main.ts) of your application. -### How to include external css files such as bootstrap.css ? +#### How to include external css files such as bootstrap.css ? Just install the lib and import the css files in [vendor.ts](https://github.com/preboot/angular2-webpack/blob/master/src/vendor.ts). For example this is how to do it with bootstrap: From 66048d6e0b068c7bcd6a9077fa127b6b95b4b125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Thu, 1 Sep 2016 12:32:55 +0200 Subject: [PATCH 15/67] chore: update to RC6 --- CHANGELOG.md | 12 ++++++++++++ package.json | 20 ++++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef4ca1e1..221b9810 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 1 September 2016 + +- Using RC6. + +## 28 August 2016 + +- Adding webpack-dashboard. + +## 23 August 2016 + +- Adding HMR support. + ## 3 July 2016 - Use html5mode instead of hash navigation. diff --git a/package.json b/package.json index 7b6787a4..0c6e811f 100644 --- a/package.json +++ b/package.json @@ -24,18 +24,18 @@ "postinstall": "npm run webdriver-update && typings install" }, "dependencies": { - "@angular/common": "2.0.0-rc.5", - "@angular/compiler": "2.0.0-rc.5", - "@angular/core": "2.0.0-rc.5", - "@angular/forms": "0.3.0", - "@angular/http": "2.0.0-rc.5", - "@angular/platform-browser": "2.0.0-rc.5", - "@angular/platform-browser-dynamic": "2.0.0-rc.5", - "@angular/router": "3.0.0-rc.1", + "@angular/common": "2.0.0-rc.6", + "@angular/compiler": "2.0.0-rc.6", + "@angular/core": "2.0.0-rc.6", + "@angular/forms": "2.0.0-rc.6", + "@angular/http": "2.0.0-rc.6", + "@angular/platform-browser": "2.0.0-rc.6", + "@angular/platform-browser-dynamic": "2.0.0-rc.6", + "@angular/router": "3.0.0-rc.2", "core-js": "^2.4.1", "reflect-metadata": "0.1.3", - "rxjs": "5.0.0-beta.6", - "zone.js": "^0.6.12" + "rxjs": "5.0.0-beta.11", + "zone.js": "^0.6.17" }, "devDependencies": { "@angularclass/hmr": "^1.0.1", From dcc92ed7d7d29768fbc1ea8719ef897cf5d8a1de Mon Sep 17 00:00:00 2001 From: Wesley Cho Date: Mon, 5 Sep 2016 02:08:50 -0700 Subject: [PATCH 16/67] feat(typescript): upgrade to 2 (#164) - Upgrade to TypeScript 2 - Remove typings in favor of npm's @types --- package.json | 10 +++++++--- tsconfig.json | 9 ++++++++- typings.json | 9 --------- 3 files changed, 15 insertions(+), 13 deletions(-) delete mode 100644 typings.json diff --git a/package.json b/package.json index 0c6e811f..28e0bfce 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "docs": "typedoc --options typedoc.json src/app/app.component.ts", "start": "npm run server", "start:hmr": "npm run server -- --hot", - "postinstall": "npm run webdriver-update && typings install" + "postinstall": "npm run webdriver-update" }, "dependencies": { "@angular/common": "2.0.0-rc.6", @@ -40,6 +40,11 @@ "devDependencies": { "@angularclass/hmr": "^1.0.1", "@angularclass/hmr-loader": "^1.0.0", + "@types/core-js": "^0.9.0", + "@types/jasmine": "^2.2.29", + "@types/node": "^6.0.38", + "@types/protractor": "^1.5.16", + "@types/selenium-webdriver": "^2.44.26", "angular2-template-loader": "^0.4.0", "autoprefixer": "^6.3.2", "codelyzer": "0.0.26", @@ -78,8 +83,7 @@ "tslint": "^3.4.0", "tslint-loader": "^2.1.0", "typedoc": "^0.4.4", - "typescript": "^1.8.0", - "typings": "^1.0.4", + "typescript": "2.0.2", "url-loader": "^0.5.6", "webpack": "^1.12.13", "webpack-dashboard": "^0.1.8", diff --git a/tsconfig.json b/tsconfig.json index 816f4934..86193a48 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,14 @@ "emitDecoratorMetadata": true, "experimentalDecorators": true, "sourceMap": true, - "noEmitHelpers": true + "noEmitHelpers": true, + "types": [ + "core-js", + "jasmine", + "node", + "protractor", + "selenium-webdriver" + ] }, "compileOnSave": false, "buildOnSave": false diff --git a/typings.json b/typings.json deleted file mode 100644 index 24c71d59..00000000 --- a/typings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "globalDevDependencies": { - "jasmine": "registry:dt/jasmine#2.2.0+20160412134438" - }, - "globalDependencies": { - "core-js": "registry:dt/core-js#0.0.0+20160725163759", - "node": "registry:dt/node#4.0.0+20160501135006" - } -} From 91f9e03dcf915cd57e4f6cccf4474e3b7983c893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Mon, 5 Sep 2016 11:11:16 +0200 Subject: [PATCH 17/67] chore: add quiet mode for the dashboard --- CHANGELOG.md | 4 ++++ package.json | 2 +- webpack.config.js | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 221b9810..8b3ba824 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +# 5 September 2016 + +- Migration to TS2 and @types + ## 1 September 2016 - Using RC6. diff --git a/package.json b/package.json index 28e0bfce..2a39ab32 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "clean-start": "npm run clean-install && npm start", "watch": "webpack --watch --progress --profile", "build": "rimraf dist && webpack --progress --profile --bail", - "server": "webpack-dashboard -- webpack-dev-server --inline --progress --port 8080", + "server": "webpack-dashboard -- webpack-dev-server --port 8080", "webdriver-update": "webdriver-manager update", "webdriver-start": "webdriver-manager start", "lint": "tslint --force \"src/**/*.ts\"", diff --git a/webpack.config.js b/webpack.config.js index 1a6248c7..ae3124e4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -252,6 +252,7 @@ module.exports = function makeWebpackConfig() { config.devServer = { contentBase: './src/public', historyApiFallback: true, + quiet: true, stats: 'minimal' // none (or false), errors-only, minimal, normal (or true) and verbose }; From 95d17dabb86e89e3419684c0c936ce6a9d700713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Mon, 5 Sep 2016 14:37:15 +0200 Subject: [PATCH 18/67] chore: restore --inline flag Fixes #170 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a39ab32..d08e736d 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "clean-start": "npm run clean-install && npm start", "watch": "webpack --watch --progress --profile", "build": "rimraf dist && webpack --progress --profile --bail", - "server": "webpack-dashboard -- webpack-dev-server --port 8080", + "server": "webpack-dashboard -- webpack-dev-server --inline --port 8080", "webdriver-update": "webdriver-manager update", "webdriver-start": "webdriver-manager start", "lint": "tslint --force \"src/**/*.ts\"", From 3da2f615d37016d05f61e92f352aa487788506b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Fri, 9 Sep 2016 21:00:43 +0300 Subject: [PATCH 19/67] chore: put dependencies like angular package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d08e736d..203c5f2a 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@angular/platform-browser-dynamic": "2.0.0-rc.6", "@angular/router": "3.0.0-rc.2", "core-js": "^2.4.1", - "reflect-metadata": "0.1.3", + "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.11", "zone.js": "^0.6.17" }, From 65c9b013d5f1887ebb33401be40c2ff88b5f6281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Thu, 15 Sep 2016 11:37:42 +0200 Subject: [PATCH 20/67] chore: Final Angular 2 release --- package.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 203c5f2a..2568e28e 100644 --- a/package.json +++ b/package.json @@ -24,18 +24,18 @@ "postinstall": "npm run webdriver-update" }, "dependencies": { - "@angular/common": "2.0.0-rc.6", - "@angular/compiler": "2.0.0-rc.6", - "@angular/core": "2.0.0-rc.6", - "@angular/forms": "2.0.0-rc.6", - "@angular/http": "2.0.0-rc.6", - "@angular/platform-browser": "2.0.0-rc.6", - "@angular/platform-browser-dynamic": "2.0.0-rc.6", - "@angular/router": "3.0.0-rc.2", + "@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/router": "3.0.0", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", - "rxjs": "5.0.0-beta.11", - "zone.js": "^0.6.17" + "rxjs": "5.0.0-beta.12", + "zone.js": "^0.6.21" }, "devDependencies": { "@angularclass/hmr": "^1.0.1", From f098997f079fa00a757e2cf86105cda610c25ea9 Mon Sep 17 00:00:00 2001 From: onlyann Date: Mon, 19 Sep 2016 02:44:26 +1000 Subject: [PATCH 21/67] Awesome typescript loader and fix sourcemap in test-watch mode (#185) * replace ts-loader with awesome-typescript-loader * skip code coverage in test watch mode. * Only runs Chrome in test-watch mode * fix missing ENV declaration in karma conf * use non ES6 import syntax in webpack.config make awesome-typescript-loader work with remap-istanbul. --- karma.conf.js | 42 +++++++++++++++++++----------------------- package.json | 3 ++- tsconfig.json | 6 +++++- webpack.config.js | 31 ++++++++++++++++++------------- 4 files changed, 44 insertions(+), 38 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 5b654613..b6ce9d30 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -2,6 +2,9 @@ var path = require('path'); var webpackConfig = require('./webpack.config'); +var ENV = process.env.npm_lifecycle_event; +var isTestWatch = ENV === 'test-watch'; + module.exports = function (config) { var _config = { @@ -34,27 +37,6 @@ module.exports = function (config) { stats: 'errors-only' }, - coverageReporter: { - dir: 'coverage/', - reporters: [{ - type: 'json', - dir: 'coverage', - subdir: 'json', - file: 'coverage-final.json' - }] - }, - - remapIstanbulReporter: { - src: 'coverage/json/coverage-final.json', - reports: { - lcovonly: 'coverage/json/lcov.info', - html: 'coverage/html', - 'text': null - }, - timeoutNotCreated: 1000, // default value - timeoutNoMoreFiles: 1000 // default value - }, - webpackServer: { noInfo: true // please don't spam the console when running in karma! }, @@ -62,7 +44,7 @@ module.exports = function (config) { // test results reporter to use // possible values: 'dots', 'progress', 'mocha' // available reporters: https://npmjs.org/browse/keyword/karma-reporter - reporters: ["mocha", "coverage", "karma-remap-istanbul"], + reporters: ["mocha"], // web server port port: 9876, @@ -79,13 +61,27 @@ module.exports = function (config) { // start these browsers // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: ['PhantomJS'], // you can also use Chrome + browsers: isTestWatch ? ['Chrome'] : ['PhantomJS'], // Continuous Integration mode // if true, Karma captures browsers, runs the tests and exits singleRun: true }; + if (!isTestWatch) { + _config.reporters.push("coverage"); + + _config.coverageReporter = { + dir: 'coverage/', + reporters: [{ + type: 'json', + dir: 'coverage', + subdir: 'json', + file: 'coverage-final.json' + }] + }; + } + config.set(_config); }; diff --git a/package.json b/package.json index 2568e28e..f203f9ba 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "e2e-live": "protractor --elementExplorer", "pretest": "npm run lint", "test": "karma start", + "posttest": "remap-istanbul -i coverage/json/coverage-final.json -o coverage/html -t html", "test-watch": "karma start --no-single-run --auto-watch", "ci": "npm run e2e && npm run test", "docs": "typedoc --options typedoc.json src/app/app.component.ts", @@ -47,6 +48,7 @@ "@types/selenium-webdriver": "^2.44.26", "angular2-template-loader": "^0.4.0", "autoprefixer": "^6.3.2", + "awesome-typescript-loader": "^2.2.4", "codelyzer": "0.0.26", "copy-webpack-plugin": "^3.0.0", "css-loader": "^0.23.0", @@ -79,7 +81,6 @@ "shelljs": "^0.7.0", "style-loader": "^0.13.0", "ts-helpers": "^1.1.1", - "ts-loader": "^0.8.1", "tslint": "^3.4.0", "tslint-loader": "^2.1.0", "typedoc": "^0.4.4", diff --git a/tsconfig.json b/tsconfig.json index 86193a48..f27f5724 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,5 +15,9 @@ ] }, "compileOnSave": false, - "buildOnSave": false + "buildOnSave": false, + "awesomeTypescriptLoaderOptions": { + "forkChecker": true, + "useWebpackText": true + } } diff --git a/webpack.config.js b/webpack.config.js index ae3124e4..422f3bd7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -9,13 +9,15 @@ var HtmlWebpackPlugin = require('html-webpack-plugin'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var CopyWebpackPlugin = require('copy-webpack-plugin'); var DashboardPlugin = require('webpack-dashboard/plugin'); +var ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin; /** * Env * Get npm lifecycle event to identify the environment */ var ENV = process.env.npm_lifecycle_event; -var isTest = ENV === 'test' || ENV === 'test-watch'; +var isTestWatch = ENV === 'test-watch'; +var isTest = ENV === 'test' || isTestWatch; var isProd = ENV === 'build'; module.exports = function makeWebpackConfig() { @@ -33,7 +35,11 @@ module.exports = function makeWebpackConfig() { */ if (isProd) { config.devtool = 'source-map'; - } else { + } + else if (isTest) { + config.devtool = 'inline-source-map'; + } + else { config.devtool = 'eval-source-map'; } @@ -76,6 +82,12 @@ module.exports = function makeWebpackConfig() { } }; + var atlOptions = ''; + if (isTest && !isTestWatch) { + // awesome-typescript-loader needs to output inlineSourceMap for code coverage to work with source maps. + atlOptions = 'inlineSourceMap=true&sourceMap=false'; + } + /** * Loaders * Reference: http://webpack.github.io/docs/configuration.html#module-loaders @@ -88,7 +100,7 @@ module.exports = function makeWebpackConfig() { // Support for .ts files. { test: /\.ts$/, - loaders: ['ts', 'angular2-template-loader', '@angularclass/hmr-loader'], + loaders: ['awesome-typescript-loader?' + atlOptions, 'angular2-template-loader', '@angularclass/hmr-loader'], exclude: [isTest ? /\.(e2e)\.ts$/ : /\.(spec|e2e)\.ts$/, /node_modules\/(?!(ng2-.+))/] }, @@ -130,7 +142,7 @@ module.exports = function makeWebpackConfig() { postLoaders: [] }; - if (isTest) { + if (isTest && !isTestWatch) { // instrument only testing sources with Istanbul, covers ts files config.module.postLoaders.push({ test: /\.ts$/, @@ -138,15 +150,6 @@ module.exports = function makeWebpackConfig() { loader: 'istanbul-instrumenter-loader', exclude: [/\.spec\.ts$/, /\.e2e\.ts$/, /node_modules/] }); - - // needed for remap-instanbul - config.ts = { - compilerOptions: { - sourceMap: false, - sourceRoot: './src', - inlineSourceMap: true - } - }; } /** @@ -171,6 +174,8 @@ module.exports = function makeWebpackConfig() { if (!isTest) { config.plugins.push( + new ForkCheckerPlugin(), + // Generate common chunks if necessary // Reference: https://webpack.github.io/docs/code-splitting.html // Reference: https://webpack.github.io/docs/list-of-plugins.html#commonschunkplugin From 0ea08075580abf9c3a5bc1ac8fbb028d1bfe7d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Sun, 18 Sep 2016 18:46:05 +0200 Subject: [PATCH 22/67] chore: update changelog with latest updates --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b3ba824..25d36e0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +# 18 September 2016 + +- Using `awesome-typescript-loader` instead of `ts-loader`. + # 5 September 2016 - Migration to TS2 and @types From c668fc32e25b792d09e280833086948d22cac864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Thu, 22 Sep 2016 12:00:14 +0200 Subject: [PATCH 23/67] chore: lock selenium-webdriver and remove types from tsconfig --- package.json | 2 +- tsconfig.json | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index f203f9ba..cebc0563 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/jasmine": "^2.2.29", "@types/node": "^6.0.38", "@types/protractor": "^1.5.16", - "@types/selenium-webdriver": "^2.44.26", + "@types/selenium-webdriver": "2.44.26", "angular2-template-loader": "^0.4.0", "autoprefixer": "^6.3.2", "awesome-typescript-loader": "^2.2.4", diff --git a/tsconfig.json b/tsconfig.json index f27f5724..5b8aeb67 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,14 +5,7 @@ "emitDecoratorMetadata": true, "experimentalDecorators": true, "sourceMap": true, - "noEmitHelpers": true, - "types": [ - "core-js", - "jasmine", - "node", - "protractor", - "selenium-webdriver" - ] + "noEmitHelpers": true }, "compileOnSave": false, "buildOnSave": false, From ebacb389a4372116b07208922c1e84136f0328ef Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Mon, 26 Sep 2016 19:03:55 +0300 Subject: [PATCH 24/67] update to angular 2.0.1 --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index cebc0563..bd4d5ba5 100644 --- a/package.json +++ b/package.json @@ -25,14 +25,14 @@ "postinstall": "npm run webdriver-update" }, "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/router": "3.0.0", + "@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/router": "3.0.1", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.12", From aad90f2f10e791a07a6250d175810242bf291003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Sat, 1 Oct 2016 21:22:02 +0300 Subject: [PATCH 25/67] chore: update karma stuff --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 59675215..2bfd479b 100644 --- a/package.json +++ b/package.json @@ -60,15 +60,15 @@ "jasmine-core": "^2.3.4", "jasmine-spec-reporter": "^2.4.0", "json-loader": "^0.5.3", - "karma": "1.1.2", - "karma-chrome-launcher": "^1.0.1", + "karma": "1.3.0", + "karma-chrome-launcher": "^2.0.0", "karma-coverage": "^1.0.0", "karma-jasmine": "^1.0.2", "karma-mocha-reporter": "^2.0.3", "karma-phantomjs-launcher": "^1.0.0", - "karma-remap-istanbul": "0.1.1", + "karma-remap-istanbul": "0.2.1", "karma-sourcemap-loader": "^0.3.7", - "karma-webpack": "1.7.0", + "karma-webpack": "1.8.0", "node-sass": "^3.4.2", "null-loader": "0.1.1", "phantomjs-prebuilt": "^2.1.4", From b9e9c5972efa18d85eb4968fa1276b774b277296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Mon, 3 Oct 2016 18:03:02 +0300 Subject: [PATCH 26/67] chore: update to webpack 2 --- package.json | 10 ++-- webpack.config.js | 117 +++++++++++++++++++++++++--------------------- 2 files changed, 68 insertions(+), 59 deletions(-) diff --git a/package.json b/package.json index 2bfd479b..29b011a0 100644 --- a/package.json +++ b/package.json @@ -51,8 +51,8 @@ "awesome-typescript-loader": "^2.2.4", "codelyzer": "0.0.26", "copy-webpack-plugin": "^3.0.0", - "css-loader": "^0.23.0", - "extract-text-webpack-plugin": "^1.0.1", + "css-loader": "^0.25.0", + "extract-text-webpack-plugin": "^2.0.0-beta.4", "file-loader": "^0.9.0", "html-loader": "^0.4.0", "html-webpack-plugin": "^2.8.1", @@ -72,7 +72,7 @@ "node-sass": "^3.4.2", "null-loader": "0.1.1", "phantomjs-prebuilt": "^2.1.4", - "postcss-loader": "^0.9.1", + "postcss-loader": "^0.13.0", "protractor": "^3.1.1", "raw-loader": "0.5.1", "remap-istanbul": "^0.6.4", @@ -86,8 +86,8 @@ "typedoc": "^0.4.4", "typescript": "2.0.2", "url-loader": "^0.5.6", - "webpack": "^1.12.13", + "webpack": "^2.1.0-beta.25", "webpack-dashboard": "^0.1.8", - "webpack-dev-server": "^1.14.1" + "webpack-dev-server": "^2.1.0-beta.8" } } diff --git a/webpack.config.js b/webpack.config.js index 422f3bd7..3ea41507 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -35,7 +35,7 @@ module.exports = function makeWebpackConfig() { */ if (isProd) { config.devtool = 'source-map'; - } + } else if (isTest) { config.devtool = 'inline-source-map'; } @@ -43,9 +43,6 @@ module.exports = function makeWebpackConfig() { config.devtool = 'eval-source-map'; } - // add debug messages - config.debug = !isProd || !isTest; - /** * Entry * Reference: http://webpack.github.io/docs/configuration.html#entry @@ -72,21 +69,15 @@ module.exports = function makeWebpackConfig() { * Reference: http://webpack.github.io/docs/configuration.html#resolve */ config.resolve = { - cache: !isTest, - root: root(), // only discover files that have those extensions - extensions: ['', '.ts', '.js', '.json', '.css', '.scss', '.html'], - alias: { - 'app': 'src/app', - 'common': 'src/common' - } + extensions: ['.ts', '.js', '.json', '.css', '.scss', '.html'], }; var atlOptions = ''; if (isTest && !isTestWatch) { // awesome-typescript-loader needs to output inlineSourceMap for code coverage to work with source maps. atlOptions = 'inlineSourceMap=true&sourceMap=false'; - } + } /** * Loaders @@ -95,8 +86,7 @@ module.exports = function makeWebpackConfig() { * This handles most of the magic responsible for converting modules */ config.module = { - preLoaders: isTest ? [] : [{test: /\.ts$/, loader: 'tslint'}], - loaders: [ + rules: [ // Support for .ts files. { test: /\.ts$/, @@ -119,7 +109,7 @@ module.exports = function makeWebpackConfig() { { test: /\.css$/, exclude: root('src', 'app'), - loader: isTest ? 'null' : ExtractTextPlugin.extract('style', 'css?sourceMap!postcss') + loader: isTest ? 'null' : ExtractTextPlugin.extract({ fallbackLoader: 'style-loader', loader: ['css', 'postcss']}) }, // all css required in src/app files will be merged in js files {test: /\.css$/, include: root('src', 'app'), loader: 'raw!postcss'}, @@ -130,7 +120,7 @@ module.exports = function makeWebpackConfig() { { test: /\.scss$/, exclude: root('src', 'app'), - loader: isTest ? 'null' : ExtractTextPlugin.extract('style', 'css?sourceMap!postcss!sass') + loader: isTest ? 'null' : ExtractTextPlugin.extract({ fallbackLoader: 'style-loader', loader: ['css', 'postcss', 'sass']}) }, // all css required in src/app files will be merged in js files {test: /\.scss$/, exclude: root('src', 'style'), loader: 'raw!postcss!sass'}, @@ -138,20 +128,29 @@ module.exports = function makeWebpackConfig() { // support for .html as raw text // todo: change the loader to something that adds a hash to images {test: /\.html$/, loader: 'raw', exclude: root('src', 'public')} - ], - postLoaders: [] + ] }; if (isTest && !isTestWatch) { // instrument only testing sources with Istanbul, covers ts files - config.module.postLoaders.push({ + config.module.rules.push({ test: /\.ts$/, + enforce: 'post', include: path.resolve('src'), loader: 'istanbul-instrumenter-loader', exclude: [/\.spec\.ts$/, /\.e2e\.ts$/, /node_modules/] }); } + if (!isTest || !isTestWatch) { + // tslint support + config.module.rules.push({ + test: /\.ts$/, + enforce: 'pre', + loader: 'tslint' + }); + } + /** * Plugins * Reference: http://webpack.github.io/docs/configuration.html#plugins @@ -165,6 +164,45 @@ module.exports = function makeWebpackConfig() { 'process.env': { ENV: JSON.stringify(ENV) } + }), + + // Workaround needed for angular 2 angular/angular#11580 + new webpack.ContextReplacementPlugin( + // The (\\|\/) piece accounts for path separators in *nix and Windows + /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/, + root('./src') // location of your src + ), + + // Tslint configuration for webpack 2 + new webpack.LoaderOptionsPlugin({ + options: { + /** + * Apply the tslint loader as pre/postLoader + * Reference: https://github.com/wbuchwalter/tslint-loader + */ + tslint: { + emitErrors: false, + failOnHint: false + }, + /** + * Sass + * Reference: https://github.com/jtangelder/sass-loader + * Transforms .scss files to .css + */ + sassLoader: { + //includePaths: [path.resolve(__dirname, "node_modules/foundation-sites/scss")] + }, + /** + * PostCSS + * Reference: https://github.com/postcss/autoprefixer-core + * Add vendor prefixes to your css + */ + postcss: [ + autoprefixer({ + browsers: ['last 2 version'] + }) + ] + } }) ]; @@ -172,7 +210,7 @@ module.exports = function makeWebpackConfig() { config.plugins.push(new DashboardPlugin()); } - if (!isTest) { + if (!isTest || !isTestWatch) { config.plugins.push( new ForkCheckerPlugin(), @@ -193,7 +231,7 @@ module.exports = function makeWebpackConfig() { // Extract css files // Reference: https://github.com/webpack/extract-text-webpack-plugin // Disabled when in test mode or not in build mode - new ExtractTextPlugin('css/[name].[hash].css', {disable: !isProd}) + new ExtractTextPlugin({filename: 'css/[name].[hash].css', disable: !isProd}) ); } @@ -204,13 +242,13 @@ module.exports = function makeWebpackConfig() { // Only emit files when there are no errors new webpack.NoErrorsPlugin(), - // Reference: http://webpack.github.io/docs/list-of-plugins.html#dedupeplugin - // Dedupe modules in the output - new webpack.optimize.DedupePlugin(), + // // Reference: http://webpack.github.io/docs/list-of-plugins.html#dedupeplugin + // // Dedupe modules in the output + // new webpack.optimize.DedupePlugin(), // Reference: http://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin // Minify all javascript, switch loaders to minimizing mode - new webpack.optimize.UglifyJsPlugin({mangle: { keep_fnames: true }}), + new webpack.optimize.UglifyJsPlugin({sourceMap: true, mangle: { keep_fnames: true }}), // Copy assets from the public folder // Reference: https://github.com/kevlened/copy-webpack-plugin @@ -220,35 +258,6 @@ module.exports = function makeWebpackConfig() { ); } - /** - * PostCSS - * Reference: https://github.com/postcss/autoprefixer-core - * Add vendor prefixes to your css - */ - config.postcss = [ - autoprefixer({ - browsers: ['last 2 version'] - }) - ]; - - /** - * Sass - * Reference: https://github.com/jtangelder/sass-loader - * Transforms .scss files to .css - */ - config.sassLoader = { - //includePaths: [path.resolve(__dirname, "node_modules/foundation-sites/scss")] - }; - - /** - * Apply the tslint loader as pre/postLoader - * Reference: https://github.com/wbuchwalter/tslint-loader - */ - config.tslint = { - emitErrors: false, - failOnHint: false - }; - /** * Dev server configuration * Reference: http://webpack.github.io/docs/configuration.html#devserver From 9f9c4a948a1e1bf85c572239a52af4d0cf8c5d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Tue, 4 Oct 2016 16:37:21 +0200 Subject: [PATCH 27/67] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25d36e0f..ba275de1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +# 04 October 2016 + +- Migrate to webpack 2 + # 18 September 2016 - Using `awesome-typescript-loader` instead of `ts-loader`. From a17b1fbb8e4aeb41827200dbd6942a9babdc15be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Wed, 5 Oct 2016 23:40:13 +0200 Subject: [PATCH 28/67] fix typo in webpack config --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 3ea41507..80a46807 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -210,7 +210,7 @@ module.exports = function makeWebpackConfig() { config.plugins.push(new DashboardPlugin()); } - if (!isTest || !isTestWatch) { + if (!isTest && !isTestWatch) { config.plugins.push( new ForkCheckerPlugin(), From c2b5216fb07865b0d7b16d7131816018db0b59e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Sat, 8 Oct 2016 13:31:57 +0200 Subject: [PATCH 29/67] revert to dev-server beta 5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 29b011a0..c5559220 100644 --- a/package.json +++ b/package.json @@ -88,6 +88,6 @@ "url-loader": "^0.5.6", "webpack": "^2.1.0-beta.25", "webpack-dashboard": "^0.1.8", - "webpack-dev-server": "^2.1.0-beta.8" + "webpack-dev-server": "2.1.0-beta.5" } } From c7a490ac4758484ce472e4fd5aebd148e957c652 Mon Sep 17 00:00:00 2001 From: Gary Bortosky Date: Sun, 9 Oct 2016 04:59:50 -0500 Subject: [PATCH 30/67] correct the url for typedoc in readme (#206) * correct the url for typedoc in readme * fix the other occurrence --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c79ca104..3a43c6a2 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ This seed repo serves as an Angular 2 starter for anyone looking to get up and r * End-to-end Angular 2 code using [Protractor](https://angular.github.io/protractor/). * Stylesheets with [SASS](http://sass-lang.com/) (not required, it supports regular css too). * Error reported with [TSLint](http://palantir.github.io/tslint/) and [Codelyzer](https://github.com/mgechev/codelyzer). -* Documentation with [TypeDoc](http://typedoc.io/). +* Documentation with [TypeDoc](http://typedoc.org/). >Warning: Make sure you're using the latest version of Node.js and NPM @@ -110,7 +110,7 @@ You can now go to `/dist` and deploy that to your server! ## Documentation -You can generate api docs (using [TypeDoc](http://typedoc.io/)) for your code with the following: +You can generate api docs (using [TypeDoc](http://typedoc.org/)) for your code with the following: * `npm run docs` From ccf3a0e83a0b9939d02c79ad7da846f501416451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Thu, 13 Oct 2016 01:26:37 +0200 Subject: [PATCH 31/67] bump dev-server to a working version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c5559220..3857b5ea 100644 --- a/package.json +++ b/package.json @@ -88,6 +88,6 @@ "url-loader": "^0.5.6", "webpack": "^2.1.0-beta.25", "webpack-dashboard": "^0.1.8", - "webpack-dev-server": "2.1.0-beta.5" + "webpack-dev-server": "2.1.0-beta.9" } } From 42ef697c6ce8fc8c924d6f3535e4649a8165846a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Mon, 17 Oct 2016 22:33:50 +0200 Subject: [PATCH 32/67] chore: update to 2.1.0 --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 3857b5ea..6adc13f4 100644 --- a/package.json +++ b/package.json @@ -25,14 +25,14 @@ "postinstall": "npm run webdriver-update" }, "dependencies": { - "@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/router": "3.0.1", + "@angular/common": "2.1.0", + "@angular/compiler": "2.1.0", + "@angular/core": "2.1.0", + "@angular/forms": "2.1.0", + "@angular/http": "2.1.0", + "@angular/platform-browser": "2.1.0", + "@angular/platform-browser-dynamic": "2.1.0", + "@angular/router": "3.1.0", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.12", From e52b24cb8ed311001112a5fd7c08f0d3d4a7cfd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesu=CC=81s=20Rodri=CC=81guez?= Date: Sun, 23 Oct 2016 18:46:07 +0200 Subject: [PATCH 33/67] bump typescript --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6adc13f4..6a4976e3 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "tslint": "^3.4.0", "tslint-loader": "^2.1.0", "typedoc": "^0.4.4", - "typescript": "2.0.2", + "typescript": "2.0.3", "url-loader": "^0.5.6", "webpack": "^2.1.0-beta.25", "webpack-dashboard": "^0.1.8", From bfd239db6304a3440723826ec2d7e6c727e86cf3 Mon Sep 17 00:00:00 2001 From: monnef Date: Thu, 27 Oct 2016 14:25:41 +0200 Subject: [PATCH 34/67] Add SASS file type to be processed by SASS. (#225) --- webpack.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 80a46807..0c843eb4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -118,12 +118,12 @@ module.exports = function makeWebpackConfig() { // use 'null' loader in test mode (https://github.com/webpack/null-loader) // all css in src/style will be bundled in an external css file { - test: /\.scss$/, + test: /\.(scss|sass)$/, exclude: root('src', 'app'), loader: isTest ? 'null' : ExtractTextPlugin.extract({ fallbackLoader: 'style-loader', loader: ['css', 'postcss', 'sass']}) }, // all css required in src/app files will be merged in js files - {test: /\.scss$/, exclude: root('src', 'style'), loader: 'raw!postcss!sass'}, + {test: /\.(scss|sass)$/, exclude: root('src', 'style'), loader: 'raw!postcss!sass'}, // support for .html as raw text // todo: change the loader to something that adds a hash to images From 85031c95b647e6cc2c4ba754ad176a08394edd91 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Thu, 27 Oct 2016 23:17:21 +0200 Subject: [PATCH 35/67] bump to 2.1.2 --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 6a4976e3..0f402bb7 100644 --- a/package.json +++ b/package.json @@ -25,14 +25,14 @@ "postinstall": "npm run webdriver-update" }, "dependencies": { - "@angular/common": "2.1.0", - "@angular/compiler": "2.1.0", - "@angular/core": "2.1.0", - "@angular/forms": "2.1.0", - "@angular/http": "2.1.0", - "@angular/platform-browser": "2.1.0", - "@angular/platform-browser-dynamic": "2.1.0", - "@angular/router": "3.1.0", + "@angular/common": "2.1.2", + "@angular/compiler": "2.1.2", + "@angular/core": "2.1.2", + "@angular/forms": "2.1.2", + "@angular/http": "2.1.2", + "@angular/platform-browser": "2.1.2", + "@angular/platform-browser-dynamic": "2.1.2", + "@angular/router": "3.1.2", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.12", From bf87ed9585c71be5f9aeb44243130039dcf3bc5e Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Sun, 30 Oct 2016 23:28:38 +0100 Subject: [PATCH 36/67] update dependencies --- package.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 0f402bb7..848518d7 100644 --- a/package.json +++ b/package.json @@ -46,11 +46,11 @@ "@types/node": "^6.0.38", "@types/protractor": "^1.5.16", "@types/selenium-webdriver": "2.44.26", - "angular2-template-loader": "^0.4.0", + "angular2-template-loader": "^0.6.0", "autoprefixer": "^6.3.2", "awesome-typescript-loader": "^2.2.4", - "codelyzer": "0.0.26", - "copy-webpack-plugin": "^3.0.0", + "codelyzer": "1.0.0-beta.3", + "copy-webpack-plugin": "^4.0.0", "css-loader": "^0.25.0", "extract-text-webpack-plugin": "^2.0.0-beta.4", "file-loader": "^0.9.0", @@ -72,7 +72,7 @@ "node-sass": "^3.4.2", "null-loader": "0.1.1", "phantomjs-prebuilt": "^2.1.4", - "postcss-loader": "^0.13.0", + "postcss-loader": "^1.1.0", "protractor": "^3.1.1", "raw-loader": "0.5.1", "remap-istanbul": "^0.6.4", @@ -83,11 +83,11 @@ "ts-helpers": "^1.1.1", "tslint": "^3.4.0", "tslint-loader": "^2.1.0", - "typedoc": "^0.4.4", - "typescript": "2.0.3", + "typedoc": "^0.5.1", + "typescript": "2.0.6", "url-loader": "^0.5.6", "webpack": "^2.1.0-beta.25", - "webpack-dashboard": "^0.1.8", + "webpack-dashboard": "^0.2.0", "webpack-dev-server": "2.1.0-beta.9" } } From 37aa21cae03349e9d1438287e7e0306a8d20ca0e Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Mon, 31 Oct 2016 23:06:38 +0100 Subject: [PATCH 37/67] update to protractor 4 --- .editorconfig | 3 +-- package.json | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.editorconfig b/.editorconfig index 87a8c212..a443ba78 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,6 +8,5 @@ root = true charset = utf-8 indent_style = space indent_size = 2 -end_of_line = lf insert_final_newline = true -trim_trailing_whitespace = true \ No newline at end of file +trim_trailing_whitespace = true diff --git a/package.json b/package.json index 848518d7..2a2dfcc5 100644 --- a/package.json +++ b/package.json @@ -44,8 +44,7 @@ "@types/core-js": "^0.9.0", "@types/jasmine": "^2.2.29", "@types/node": "^6.0.38", - "@types/protractor": "^1.5.16", - "@types/selenium-webdriver": "2.44.26", + "@types/selenium-webdriver": "2.53.33", "angular2-template-loader": "^0.6.0", "autoprefixer": "^6.3.2", "awesome-typescript-loader": "^2.2.4", @@ -73,7 +72,7 @@ "null-loader": "0.1.1", "phantomjs-prebuilt": "^2.1.4", "postcss-loader": "^1.1.0", - "protractor": "^3.1.1", + "protractor": "^4.0.10", "raw-loader": "0.5.1", "remap-istanbul": "^0.6.4", "rimraf": "^2.5.1", From f609c4b9d3305453d57653360ea0329c14e26e57 Mon Sep 17 00:00:00 2001 From: "Chintan V. Patel" Date: Mon, 14 Nov 2016 15:51:04 +0530 Subject: [PATCH 38/67] Add loader postfix in all loaders of webpack (#240) --- webpack.config.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 0c843eb4..4b9aa875 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -101,7 +101,7 @@ module.exports = function makeWebpackConfig() { }, // Support for *.json files. - {test: /\.json$/, loader: 'json'}, + {test: /\.json$/, loader: 'json-loader'}, // Support for CSS as raw text // use 'null' loader in test mode (https://github.com/webpack/null-loader) @@ -109,10 +109,10 @@ module.exports = function makeWebpackConfig() { { test: /\.css$/, exclude: root('src', 'app'), - loader: isTest ? 'null' : ExtractTextPlugin.extract({ fallbackLoader: 'style-loader', loader: ['css', 'postcss']}) + loader: isTest ? 'null-loader' : ExtractTextPlugin.extract({ fallbackLoader: 'style-loader', loader: ['css-loader', 'postcss-loader']}) }, // all css required in src/app files will be merged in js files - {test: /\.css$/, include: root('src', 'app'), loader: 'raw!postcss'}, + {test: /\.css$/, include: root('src', 'app'), loader: 'raw-loader!postcss-loader'}, // support for .scss files // use 'null' loader in test mode (https://github.com/webpack/null-loader) @@ -120,14 +120,14 @@ module.exports = function makeWebpackConfig() { { test: /\.(scss|sass)$/, exclude: root('src', 'app'), - loader: isTest ? 'null' : ExtractTextPlugin.extract({ fallbackLoader: 'style-loader', loader: ['css', 'postcss', 'sass']}) + loader: isTest ? 'null-loader' : ExtractTextPlugin.extract({ fallbackLoader: 'style-loader', loader: ['css-loader', 'postcss-loader', 'sass-loader']}) }, // all css required in src/app files will be merged in js files - {test: /\.(scss|sass)$/, exclude: root('src', 'style'), loader: 'raw!postcss!sass'}, + {test: /\.(scss|sass)$/, exclude: root('src', 'style'), loader: 'raw-loader!postcss-loader!sass-loader'}, // support for .html as raw text // todo: change the loader to something that adds a hash to images - {test: /\.html$/, loader: 'raw', exclude: root('src', 'public')} + {test: /\.html$/, loader: 'raw-loader', exclude: root('src', 'public')} ] }; @@ -147,7 +147,7 @@ module.exports = function makeWebpackConfig() { config.module.rules.push({ test: /\.ts$/, enforce: 'pre', - loader: 'tslint' + loader: 'tslint-loader' }); } From 46727bbd6623419a83654d84c3dbaa298f50272c Mon Sep 17 00:00:00 2001 From: andrea-spotsoftware Date: Tue, 15 Nov 2016 11:01:19 +0100 Subject: [PATCH 39/67] added "loader" postfix to file-loader (#243) --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 4b9aa875..66203429 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -97,7 +97,7 @@ module.exports = function makeWebpackConfig() { // copy those assets to output { test: /\.(png|jpe?g|gif|svg|woff|woff2|ttf|eot|ico)(\?v=[0-9]\.[0-9]\.[0-9])?$/, - loader: 'file?name=fonts/[name].[hash].[ext]?' + loader: 'file-loader?name=fonts/[name].[hash].[ext]?' }, // Support for *.json files. From e1cb12b30e85333828c0a2dd0fd268157836342f Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Tue, 15 Nov 2016 20:28:26 +0100 Subject: [PATCH 40/67] chore: update to 2.2.0 --- package.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 2a2dfcc5..df906c7a 100644 --- a/package.json +++ b/package.json @@ -25,18 +25,18 @@ "postinstall": "npm run webdriver-update" }, "dependencies": { - "@angular/common": "2.1.2", - "@angular/compiler": "2.1.2", - "@angular/core": "2.1.2", - "@angular/forms": "2.1.2", - "@angular/http": "2.1.2", - "@angular/platform-browser": "2.1.2", - "@angular/platform-browser-dynamic": "2.1.2", - "@angular/router": "3.1.2", + "@angular/common": "2.2.0", + "@angular/compiler": "2.2.0", + "@angular/core": "2.2.0", + "@angular/forms": "2.2.0", + "@angular/http": "2.2.0", + "@angular/platform-browser": "2.2.0", + "@angular/platform-browser-dynamic": "2.2.0", + "@angular/router": "3.2.0", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.12", - "zone.js": "^0.6.21" + "zone.js": "^0.6.25" }, "devDependencies": { "@angularclass/hmr": "^1.0.1", From 7389b6bd335995ceceec03456e7f686368dc0bc9 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Sat, 26 Nov 2016 20:47:23 +0300 Subject: [PATCH 41/67] chore: update to 2.2.3 --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index df906c7a..6d1aadc8 100644 --- a/package.json +++ b/package.json @@ -25,14 +25,14 @@ "postinstall": "npm run webdriver-update" }, "dependencies": { - "@angular/common": "2.2.0", - "@angular/compiler": "2.2.0", - "@angular/core": "2.2.0", - "@angular/forms": "2.2.0", - "@angular/http": "2.2.0", - "@angular/platform-browser": "2.2.0", - "@angular/platform-browser-dynamic": "2.2.0", - "@angular/router": "3.2.0", + "@angular/common": "2.2.3", + "@angular/compiler": "2.2.3", + "@angular/core": "2.2.3", + "@angular/forms": "2.2.3", + "@angular/http": "2.2.3", + "@angular/platform-browser": "2.2.3", + "@angular/platform-browser-dynamic": "2.2.3", + "@angular/router": "3.2.3", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.12", From 37c710561e02cd4a71db446d3c6b2ea2c4bcc6db Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Sun, 4 Dec 2016 20:00:00 +0300 Subject: [PATCH 42/67] bump angular --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 6d1aadc8..af58a774 100644 --- a/package.json +++ b/package.json @@ -25,14 +25,14 @@ "postinstall": "npm run webdriver-update" }, "dependencies": { - "@angular/common": "2.2.3", - "@angular/compiler": "2.2.3", - "@angular/core": "2.2.3", - "@angular/forms": "2.2.3", - "@angular/http": "2.2.3", - "@angular/platform-browser": "2.2.3", - "@angular/platform-browser-dynamic": "2.2.3", - "@angular/router": "3.2.3", + "@angular/common": "2.2.4", + "@angular/compiler": "2.2.4", + "@angular/core": "2.2.4", + "@angular/forms": "2.2.4", + "@angular/http": "2.2.4", + "@angular/platform-browser": "2.2.4", + "@angular/platform-browser-dynamic": "2.2.4", + "@angular/router": "3.2.4", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.12", From 43bb7ea418e725d297748f9573ca0c775ab13c3a Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Sun, 11 Dec 2016 22:43:47 +0100 Subject: [PATCH 43/67] bump to 2.3.0 --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index af58a774..9c793123 100644 --- a/package.json +++ b/package.json @@ -25,14 +25,14 @@ "postinstall": "npm run webdriver-update" }, "dependencies": { - "@angular/common": "2.2.4", - "@angular/compiler": "2.2.4", - "@angular/core": "2.2.4", - "@angular/forms": "2.2.4", - "@angular/http": "2.2.4", - "@angular/platform-browser": "2.2.4", - "@angular/platform-browser-dynamic": "2.2.4", - "@angular/router": "3.2.4", + "@angular/common": "2.3.0", + "@angular/compiler": "2.3.0", + "@angular/core": "2.3.0", + "@angular/forms": "2.3.0", + "@angular/http": "2.3.0", + "@angular/platform-browser": "2.3.0", + "@angular/platform-browser-dynamic": "2.3.0", + "@angular/router": "3.3.0", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.12", From 527c2b088af1baa52017d3fb0812c39c6de81107 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Mon, 12 Dec 2016 15:28:06 +0100 Subject: [PATCH 44/67] update angular dependencies as well --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 9c793123..e2586dd0 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,8 @@ "@angular/router": "3.3.0", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", - "rxjs": "5.0.0-beta.12", - "zone.js": "^0.6.25" + "rxjs": "5.0.0-rc.4", + "zone.js": "^0.7.2" }, "devDependencies": { "@angularclass/hmr": "^1.0.1", @@ -83,7 +83,7 @@ "tslint": "^3.4.0", "tslint-loader": "^2.1.0", "typedoc": "^0.5.1", - "typescript": "2.0.6", + "typescript": "2.0.10", "url-loader": "^0.5.6", "webpack": "^2.1.0-beta.25", "webpack-dashboard": "^0.2.0", From f0fce553c20d1e5b7482a9cf4f67c891514df305 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Mon, 12 Dec 2016 15:31:20 +0100 Subject: [PATCH 45/67] remove phantomjs, no longer the community recommendation --- karma.conf.js | 2 +- package.json | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index b6ce9d30..91b79ad0 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -61,7 +61,7 @@ module.exports = function (config) { // start these browsers // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: isTestWatch ? ['Chrome'] : ['PhantomJS'], + browsers: ['Chrome'], // Continuous Integration mode // if true, Karma captures browsers, runs the tests and exits diff --git a/package.json b/package.json index e2586dd0..1dcc6e2b 100644 --- a/package.json +++ b/package.json @@ -64,13 +64,11 @@ "karma-coverage": "^1.0.0", "karma-jasmine": "^1.0.2", "karma-mocha-reporter": "^2.0.3", - "karma-phantomjs-launcher": "^1.0.0", "karma-remap-istanbul": "0.2.1", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "1.8.0", "node-sass": "^3.4.2", "null-loader": "0.1.1", - "phantomjs-prebuilt": "^2.1.4", "postcss-loader": "^1.1.0", "protractor": "^4.0.10", "raw-loader": "0.5.1", From 2ac6de60f006e0805465ef0bcbed7533a8939733 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Thu, 15 Dec 2016 19:32:22 +0300 Subject: [PATCH 46/67] bump angular --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 1dcc6e2b..f6bcc851 100644 --- a/package.json +++ b/package.json @@ -25,14 +25,14 @@ "postinstall": "npm run webdriver-update" }, "dependencies": { - "@angular/common": "2.3.0", - "@angular/compiler": "2.3.0", - "@angular/core": "2.3.0", - "@angular/forms": "2.3.0", - "@angular/http": "2.3.0", - "@angular/platform-browser": "2.3.0", - "@angular/platform-browser-dynamic": "2.3.0", - "@angular/router": "3.3.0", + "@angular/common": "2.3.1", + "@angular/compiler": "2.3.1", + "@angular/core": "2.3.1", + "@angular/forms": "2.3.1", + "@angular/http": "2.3.1", + "@angular/platform-browser": "2.3.1", + "@angular/platform-browser-dynamic": "2.3.1", + "@angular/router": "3.3.1", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-rc.4", From 17c3c99a84ca3404f71b99c4e711c91e10cd9584 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Sun, 18 Dec 2016 19:32:22 +0300 Subject: [PATCH 47/67] update some deps --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f6bcc851..d7a437ce 100644 --- a/package.json +++ b/package.json @@ -47,10 +47,10 @@ "@types/selenium-webdriver": "2.53.33", "angular2-template-loader": "^0.6.0", "autoprefixer": "^6.3.2", - "awesome-typescript-loader": "^2.2.4", + "awesome-typescript-loader": "^3.0.0-beta.17", "codelyzer": "1.0.0-beta.3", "copy-webpack-plugin": "^4.0.0", - "css-loader": "^0.25.0", + "css-loader": "^0.26.1", "extract-text-webpack-plugin": "^2.0.0-beta.4", "file-loader": "^0.9.0", "html-loader": "^0.4.0", From f9860e7ca4ce881f11d6a1a0de8f366a99eaeec8 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Mon, 19 Dec 2016 14:01:33 +0100 Subject: [PATCH 48/67] Remove webpack-dashboard I am so sorry for deciding this, but Windows support is an ass and the project seems stale. --- package.json | 5 ++--- webpack.config.js | 5 ----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index d7a437ce..5eb782e2 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "clean-start": "npm run clean-install && npm start", "watch": "webpack --watch --progress --profile", "build": "rimraf dist && webpack --progress --profile --bail", - "server": "webpack-dashboard -- webpack-dev-server --inline --port 8080", + "server": "webpack-dev-server --inline --progress --port 8080", "webdriver-update": "webdriver-manager update", "webdriver-start": "webdriver-manager start", "lint": "tslint --force \"src/**/*.ts\"", @@ -83,8 +83,7 @@ "typedoc": "^0.5.1", "typescript": "2.0.10", "url-loader": "^0.5.6", - "webpack": "^2.1.0-beta.25", - "webpack-dashboard": "^0.2.0", + "webpack": "2.1.0-beta.25", "webpack-dev-server": "2.1.0-beta.9" } } diff --git a/webpack.config.js b/webpack.config.js index 66203429..2eee936e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,7 +8,6 @@ var autoprefixer = require('autoprefixer'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var CopyWebpackPlugin = require('copy-webpack-plugin'); -var DashboardPlugin = require('webpack-dashboard/plugin'); var ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin; /** @@ -206,10 +205,6 @@ module.exports = function makeWebpackConfig() { }) ]; - if (!isTest && !isProd) { - config.plugins.push(new DashboardPlugin()); - } - if (!isTest && !isTestWatch) { config.plugins.push( new ForkCheckerPlugin(), From 397f1b05fe97923cd96eb5ecebf68e78c03cef43 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Mon, 19 Dec 2016 14:03:50 +0100 Subject: [PATCH 49/67] remove fork checker plugin, not needed anymore --- webpack.config.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 2eee936e..5327254a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -8,7 +8,6 @@ var autoprefixer = require('autoprefixer'); var HtmlWebpackPlugin = require('html-webpack-plugin'); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var CopyWebpackPlugin = require('copy-webpack-plugin'); -var ForkCheckerPlugin = require('awesome-typescript-loader').ForkCheckerPlugin; /** * Env @@ -207,8 +206,6 @@ module.exports = function makeWebpackConfig() { if (!isTest && !isTestWatch) { config.plugins.push( - new ForkCheckerPlugin(), - // Generate common chunks if necessary // Reference: https://webpack.github.io/docs/code-splitting.html // Reference: https://webpack.github.io/docs/list-of-plugins.html#commonschunkplugin From 26a970dccc1adb6fa91fc615285c8904f40d12c9 Mon Sep 17 00:00:00 2001 From: Gary Date: Tue, 20 Dec 2016 04:57:33 -0800 Subject: [PATCH 50/67] lock zone.js to 0.7.2 (#265) 0.7.3 seems to break, at least, the links --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5eb782e2..495b89af 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-rc.4", - "zone.js": "^0.7.2" + "zone.js": "0.7.2" }, "devDependencies": { "@angularclass/hmr": "^1.0.1", From 67b2c0bec22d0c03ba50cebf537cfa8005e91a8a Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Sun, 25 Dec 2016 21:28:14 +0100 Subject: [PATCH 51/67] bump to 2.4.1 --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 495b89af..dd33cddd 100644 --- a/package.json +++ b/package.json @@ -25,18 +25,18 @@ "postinstall": "npm run webdriver-update" }, "dependencies": { - "@angular/common": "2.3.1", - "@angular/compiler": "2.3.1", - "@angular/core": "2.3.1", - "@angular/forms": "2.3.1", - "@angular/http": "2.3.1", - "@angular/platform-browser": "2.3.1", - "@angular/platform-browser-dynamic": "2.3.1", + "@angular/common": "2.4.1", + "@angular/compiler": "2.4.1", + "@angular/core": "2.4.1", + "@angular/forms": "2.4.1", + "@angular/http": "2.4.1", + "@angular/platform-browser": "2.4.1", + "@angular/platform-browser-dynamic": "2.4.1", "@angular/router": "3.3.1", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-rc.4", - "zone.js": "0.7.2" + "zone.js": "^0.7.2" }, "devDependencies": { "@angularclass/hmr": "^1.0.1", From 0f5b53cd323c4cc9032c621c589d187378c80002 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Sun, 25 Dec 2016 21:28:35 +0100 Subject: [PATCH 52/67] more updated dependencies --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index dd33cddd..d98e3299 100644 --- a/package.json +++ b/package.json @@ -32,10 +32,10 @@ "@angular/http": "2.4.1", "@angular/platform-browser": "2.4.1", "@angular/platform-browser-dynamic": "2.4.1", - "@angular/router": "3.3.1", + "@angular/router": "3.4.1", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", - "rxjs": "5.0.0-rc.4", + "rxjs": "5.0.1", "zone.js": "^0.7.2" }, "devDependencies": { From f3c76ef4e02db06f58096e0bab91d3df8ab6224f Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Fri, 6 Jan 2017 19:22:32 +0300 Subject: [PATCH 53/67] bump to angular 2.4.2 --- package.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index d98e3299..adb25dc2 100644 --- a/package.json +++ b/package.json @@ -25,13 +25,13 @@ "postinstall": "npm run webdriver-update" }, "dependencies": { - "@angular/common": "2.4.1", - "@angular/compiler": "2.4.1", - "@angular/core": "2.4.1", - "@angular/forms": "2.4.1", - "@angular/http": "2.4.1", - "@angular/platform-browser": "2.4.1", - "@angular/platform-browser-dynamic": "2.4.1", + "@angular/common": "2.4.2", + "@angular/compiler": "2.4.2", + "@angular/core": "2.4.2", + "@angular/forms": "2.4.2", + "@angular/http": "2.4.2", + "@angular/platform-browser": "2.4.2", + "@angular/platform-browser-dynamic": "2.4.2", "@angular/router": "3.4.1", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", From 4f25b283ebf9314e13a9eaf9ad814824fd8e02b0 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Sat, 7 Jan 2017 20:54:20 +0100 Subject: [PATCH 54/67] bumping the router too is a good idea --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index adb25dc2..eb3e2739 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@angular/http": "2.4.2", "@angular/platform-browser": "2.4.2", "@angular/platform-browser-dynamic": "2.4.2", - "@angular/router": "3.4.1", + "@angular/router": "3.4.2", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", "rxjs": "5.0.1", From 84d25c8569c859d0debf47ff0142adf32ee2012f Mon Sep 17 00:00:00 2001 From: Gary Bortosky Date: Tue, 24 Jan 2017 10:54:12 -0600 Subject: [PATCH 55/67] update codelyzer and related (#279) * update codelyzer and related * add templates-use-public tslint rule * add compiler options for unused forbids unused locals and unused paramters * revert typescript to 2.0 --- package.json | 6 +++--- src/app/app.component.html | 2 +- src/app/app.component.ts | 3 ++- tsconfig.json | 4 +++- tslint.json | 35 +++++++++++++++++++++++------------ 5 files changed, 32 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index eb3e2739..78ac3f0f 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "angular2-template-loader": "^0.6.0", "autoprefixer": "^6.3.2", "awesome-typescript-loader": "^3.0.0-beta.17", - "codelyzer": "1.0.0-beta.3", + "codelyzer": "2.0.0-beta.4", "copy-webpack-plugin": "^4.0.0", "css-loader": "^0.26.1", "extract-text-webpack-plugin": "^2.0.0-beta.4", @@ -78,8 +78,8 @@ "shelljs": "^0.7.0", "style-loader": "^0.13.0", "ts-helpers": "^1.1.1", - "tslint": "^3.4.0", - "tslint-loader": "^2.1.0", + "tslint": "^4.3.1", + "tslint-loader": "^3.3.0", "typedoc": "^0.5.1", "typescript": "2.0.10", "url-loader": "^0.5.6", diff --git a/src/app/app.component.html b/src/app/app.component.html index 208e6687..b3b9f295 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -5,7 +5,7 @@
-

Hello from {{api.title}}!

+

Hello from {{title}}!

diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 4fc43212..01950b8a 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -11,8 +11,9 @@ import '../style/app.scss'; }) export class AppComponent { url = 'https://github.com/preboot/angular2-webpack'; + title: string; constructor(private api: ApiService) { - // Do something with api + this.title = this.api.title; } } diff --git a/tsconfig.json b/tsconfig.json index 5b8aeb67..06b76e37 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,9 @@ "emitDecoratorMetadata": true, "experimentalDecorators": true, "sourceMap": true, - "noEmitHelpers": true + "noEmitHelpers": true, + "noUnusedLocals": true, + "noUnusedParameters": true }, "compileOnSave": false, "buildOnSave": false, diff --git a/tslint.json b/tslint.json index 41c6c0e1..2c31441e 100644 --- a/tslint.json +++ b/tslint.json @@ -16,7 +16,6 @@ "spaces" ], "label-position": true, - "label-undefined": true, "max-line-length": [ true, 140 @@ -39,7 +38,6 @@ ], "no-construct": true, "no-debugger": true, - "no-duplicate-key": true, "no-duplicate-variable": true, "no-empty": false, "no-eval": true, @@ -49,8 +47,6 @@ "no-switch-case-fall-through": true, "no-trailing-whitespace": true, "no-unused-expression": true, - "no-unused-variable": true, - "no-unreachable": true, "no-use-before-declare": true, "no-var-keyword": true, "object-literal-sort-keys": false, @@ -92,11 +88,18 @@ "check-separator", "check-type" ], - - "directive-selector-name": [true, "camelCase"], - "component-selector-name": [true, "kebab-case"], - "directive-selector-type": [true, "attribute"], - "component-selector-type": [true, "element"], + "directive-selector": [ + true, + "attribute", + "my", + "camelCase" + ], + "component-selector": [ + true, + "element", + "my", + "kebab-case" + ], "use-input-property-decorator": true, "use-output-property-decorator": true, "use-host-property-decorator": true, @@ -106,8 +109,16 @@ "use-pipe-transform-interface": true, "component-class-suffix": true, "directive-class-suffix": true, - "directive-selector-prefix": [true, "my"], - "component-selector-prefix": [true, "my"], - "pipe-naming": [true, "camelCase", "my"] + "pipe-naming": [ + true, + "camelCase", + "my" + ], + "no-attribute-parameter-decorator": true, + "no-forward-ref": true, + "import-destructuring-spacing": true, + "no-access-missing-member": true, + "templates-use-public": true, + "invoke-injectable": true } } From a60fd1ad79cde7128788a705f5127f5b058c4140 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Tue, 31 Jan 2017 19:15:05 +0100 Subject: [PATCH 56/67] remove tsconfig parameters --- tsconfig.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 06b76e37..5b8aeb67 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,9 +5,7 @@ "emitDecoratorMetadata": true, "experimentalDecorators": true, "sourceMap": true, - "noEmitHelpers": true, - "noUnusedLocals": true, - "noUnusedParameters": true + "noEmitHelpers": true }, "compileOnSave": false, "buildOnSave": false, From 60d2bded0d3c67e611a7a1d5bc933141dd2fc003 Mon Sep 17 00:00:00 2001 From: Mike Escalante Date: Tue, 31 Jan 2017 14:20:13 -0500 Subject: [PATCH 57/67] Set @types/lodash version explicitly avoid TS 2.1 errors (#284) * set @types/lodash version explicitly in package.json to avoid typescript 2.1 errors * add tsconfig options back --- package.json | 1 + tsconfig.json | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 78ac3f0f..04b6e090 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "@types/jasmine": "^2.2.29", "@types/node": "^6.0.38", "@types/selenium-webdriver": "2.53.33", + "@types/lodash": "4.14.50", "angular2-template-loader": "^0.6.0", "autoprefixer": "^6.3.2", "awesome-typescript-loader": "^3.0.0-beta.17", diff --git a/tsconfig.json b/tsconfig.json index 5b8aeb67..06b76e37 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,9 @@ "emitDecoratorMetadata": true, "experimentalDecorators": true, "sourceMap": true, - "noEmitHelpers": true + "noEmitHelpers": true, + "noUnusedLocals": true, + "noUnusedParameters": true }, "compileOnSave": false, "buildOnSave": false, From 698302adbaef636b2593d214ace6622a2e84cbd9 Mon Sep 17 00:00:00 2001 From: Mike Escalante Date: Mon, 13 Feb 2017 15:44:39 -0500 Subject: [PATCH 58/67] lock @types/jasmine version to avoid TS 2.1 errors (#298) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 04b6e090..b786060d 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@angularclass/hmr": "^1.0.1", "@angularclass/hmr-loader": "^3.0.2", "@types/core-js": "^0.9.0", - "@types/jasmine": "^2.2.29", + "@types/jasmine": "2.5.41", "@types/node": "^6.0.38", "@types/selenium-webdriver": "2.53.33", "@types/lodash": "4.14.50", From b3db556bfa0b3689eb1cc0808071389949af4eea Mon Sep 17 00:00:00 2001 From: Gary Date: Fri, 17 Feb 2017 11:38:43 -0800 Subject: [PATCH 59/67] fixed depreciated fallbackLoader and loader in webpack.config (#294) --- webpack.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 5327254a..e41cfc4a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -107,7 +107,7 @@ module.exports = function makeWebpackConfig() { { test: /\.css$/, exclude: root('src', 'app'), - loader: isTest ? 'null-loader' : ExtractTextPlugin.extract({ fallbackLoader: 'style-loader', loader: ['css-loader', 'postcss-loader']}) + loader: isTest ? 'null-loader' : ExtractTextPlugin.extract({ fallback: 'style-loader', use: ['css-loader', 'postcss-loader']}) }, // all css required in src/app files will be merged in js files {test: /\.css$/, include: root('src', 'app'), loader: 'raw-loader!postcss-loader'}, @@ -118,7 +118,7 @@ module.exports = function makeWebpackConfig() { { test: /\.(scss|sass)$/, exclude: root('src', 'app'), - loader: isTest ? 'null-loader' : ExtractTextPlugin.extract({ fallbackLoader: 'style-loader', loader: ['css-loader', 'postcss-loader', 'sass-loader']}) + loader: isTest ? 'null-loader' : ExtractTextPlugin.extract({ fallback: 'style-loader', use: ['css-loader', 'postcss-loader', 'sass-loader']}) }, // all css required in src/app files will be merged in js files {test: /\.(scss|sass)$/, exclude: root('src', 'style'), loader: 'raw-loader!postcss-loader!sass-loader'}, From eaf45338b8ba53b8ca5cc759a529d2728f3af7b9 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Fri, 17 Feb 2017 21:07:00 +0100 Subject: [PATCH 60/67] remove @types/corejs in favor of tsconfig lib --- package.json | 1 - tsconfig.json | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b786060d..b9850f06 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,6 @@ "devDependencies": { "@angularclass/hmr": "^1.0.1", "@angularclass/hmr-loader": "^3.0.2", - "@types/core-js": "^0.9.0", "@types/jasmine": "2.5.41", "@types/node": "^6.0.38", "@types/selenium-webdriver": "2.53.33", diff --git a/tsconfig.json b/tsconfig.json index 06b76e37..0d06b7cf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,8 @@ "sourceMap": true, "noEmitHelpers": true, "noUnusedLocals": true, - "noUnusedParameters": true + "noUnusedParameters": true, + "lib": ["es2015", "dom"] }, "compileOnSave": false, "buildOnSave": false, From dbdecf8841a346c39d8bd70169803013a49fe3a1 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Fri, 17 Feb 2017 22:10:40 +0100 Subject: [PATCH 61/67] update a few dependencies --- package.json | 30 +++++++++++++++--------------- webpack.config.js | 20 +++++++++++--------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index b9850f06..8354bba6 100644 --- a/package.json +++ b/package.json @@ -25,14 +25,14 @@ "postinstall": "npm run webdriver-update" }, "dependencies": { - "@angular/common": "2.4.2", - "@angular/compiler": "2.4.2", - "@angular/core": "2.4.2", - "@angular/forms": "2.4.2", - "@angular/http": "2.4.2", - "@angular/platform-browser": "2.4.2", - "@angular/platform-browser-dynamic": "2.4.2", - "@angular/router": "3.4.2", + "@angular/common": "2.4.7", + "@angular/compiler": "2.4.7", + "@angular/core": "2.4.7", + "@angular/forms": "2.4.7", + "@angular/http": "2.4.7", + "@angular/platform-browser": "2.4.7", + "@angular/platform-browser-dynamic": "2.4.7", + "@angular/router": "3.4.7", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", "rxjs": "5.0.1", @@ -43,30 +43,30 @@ "@angularclass/hmr-loader": "^3.0.2", "@types/jasmine": "2.5.41", "@types/node": "^6.0.38", - "@types/selenium-webdriver": "2.53.33", + "@types/selenium-webdriver": "2.53.39", "@types/lodash": "4.14.50", "angular2-template-loader": "^0.6.0", "autoprefixer": "^6.3.2", "awesome-typescript-loader": "^3.0.0-beta.17", - "codelyzer": "2.0.0-beta.4", + "codelyzer": "2.0.0", "copy-webpack-plugin": "^4.0.0", "css-loader": "^0.26.1", "extract-text-webpack-plugin": "^2.0.0-beta.4", - "file-loader": "^0.9.0", + "file-loader": "^0.10.0", "html-loader": "^0.4.0", "html-webpack-plugin": "^2.8.1", "istanbul-instrumenter-loader": "^0.2.0", "jasmine-core": "^2.3.4", "jasmine-spec-reporter": "^2.4.0", "json-loader": "^0.5.3", - "karma": "1.3.0", + "karma": "1.4.1", "karma-chrome-launcher": "^2.0.0", "karma-coverage": "^1.0.0", "karma-jasmine": "^1.0.2", "karma-mocha-reporter": "^2.0.3", "karma-remap-istanbul": "0.2.1", "karma-sourcemap-loader": "^0.3.7", - "karma-webpack": "1.8.0", + "karma-webpack": "2.0.2", "node-sass": "^3.4.2", "null-loader": "0.1.1", "postcss-loader": "^1.1.0", @@ -83,7 +83,7 @@ "typedoc": "^0.5.1", "typescript": "2.0.10", "url-loader": "^0.5.6", - "webpack": "2.1.0-beta.25", - "webpack-dev-server": "2.1.0-beta.9" + "webpack": "2.2.1", + "webpack-dev-server": "2.3.0" } } diff --git a/webpack.config.js b/webpack.config.js index e41cfc4a..880e4819 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -41,15 +41,17 @@ module.exports = function makeWebpackConfig() { config.devtool = 'eval-source-map'; } - /** - * Entry - * Reference: http://webpack.github.io/docs/configuration.html#entry - */ - config.entry = isTest ? {} : { - 'polyfills': './src/polyfills.ts', - 'vendor': './src/vendor.ts', - 'app': './src/main.ts' // our angular app - }; + if (!isTest) { + /** + * Entry + * Reference: http://webpack.github.io/docs/configuration.html#entry + */ + config.entry = isTest ? {} : { + 'polyfills': './src/polyfills.ts', + 'vendor': './src/vendor.ts', + 'app': './src/main.ts' // our angular app + }; + } /** * Output From fb01e081f6f6e88811d56824f5b99b99fe8e5d2d Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Fri, 17 Feb 2017 22:14:21 +0100 Subject: [PATCH 62/67] swap NoErrorPlugin for NoEmitOnErrorPlugin --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 880e4819..f18b272b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -234,7 +234,7 @@ module.exports = function makeWebpackConfig() { config.plugins.push( // Reference: http://webpack.github.io/docs/list-of-plugins.html#noerrorsplugin // Only emit files when there are no errors - new webpack.NoErrorsPlugin(), + new webpack.NoEmitOnErrorsPlugin(), // // Reference: http://webpack.github.io/docs/list-of-plugins.html#dedupeplugin // // Dedupe modules in the output From d7d55f35890958a8b8f67e50ef0f7e6924ab6b25 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Fri, 17 Feb 2017 22:38:10 +0100 Subject: [PATCH 63/67] more dev dependencies updates --- package.json | 6 +++--- protractor.conf.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 8354bba6..972dc4fa 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "html-webpack-plugin": "^2.8.1", "istanbul-instrumenter-loader": "^0.2.0", "jasmine-core": "^2.3.4", - "jasmine-spec-reporter": "^2.4.0", + "jasmine-spec-reporter": "^3.2.0", "json-loader": "^0.5.3", "karma": "1.4.1", "karma-chrome-launcher": "^2.0.0", @@ -67,14 +67,14 @@ "karma-remap-istanbul": "0.2.1", "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "2.0.2", - "node-sass": "^3.4.2", + "node-sass": "^4.5.0", "null-loader": "0.1.1", "postcss-loader": "^1.1.0", "protractor": "^4.0.10", "raw-loader": "0.5.1", "remap-istanbul": "^0.6.4", "rimraf": "^2.5.1", - "sass-loader": "^4.0.0", + "sass-loader": "^6.0.1", "shelljs": "^0.7.0", "style-loader": "^0.13.0", "ts-helpers": "^1.1.1", diff --git a/protractor.conf.js b/protractor.conf.js index 12b68e5d..f2253b39 100644 --- a/protractor.conf.js +++ b/protractor.conf.js @@ -24,7 +24,7 @@ exports.config = { }, onPrepare: function () { - var SpecReporter = require('jasmine-spec-reporter'); + var SpecReporter = require('jasmine-spec-reporter').SpecReporter; // add jasmine spec reporter jasmine.getEnv().addReporter(new SpecReporter({displayStacktrace: true})); From 2718513364213663a6efa9e7af027e02f4e5ec0e Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Sun, 19 Feb 2017 18:01:33 +0100 Subject: [PATCH 64/67] remove bold paragraph in the README --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 3a43c6a2..bf32240d 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,6 @@ [![Dependency Status](https://david-dm.org/preboot/angular2-webpack/status.svg)](https://david-dm.org/preboot/angular2-webpack#info=dependencies) [![devDependency Status](https://david-dm.org/preboot/angular2-webpack/dev-status.svg)](https://david-dm.org/preboot/angular2-webpack#info=devDependencies) [![Join the chat at https://gitter.im/preboot/angular2-webpack](https://badges.gitter.im/preboot/angular2-webpack.svg)](https://gitter.im/preboot/angular2-webpack?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -**Note: This guide is following the Angular's [Style Guide](http://angular.io/styleguide) so I will be changing conventions here and there eventually. You are free to use your own conventions with this starter.** -**Note 2: There is no conventions yet for RC5 on the style guide so there will be a future update here for that.** - A complete, yet simple, starter for Angular 2 using Webpack. This seed repo serves as an Angular 2 starter for anyone looking to get up and running with Angular 2 and TypeScript fast. Using [Webpack](http://webpack.github.io/) for building our files and assisting with boilerplate. We're also using Protractor for our end-to-end story and Karma for our unit tests. From 0384b1254da188f3341358648a4e022ffa500aac Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Sun, 26 Mar 2017 18:50:35 +0200 Subject: [PATCH 65/67] bump to Angular v4 --- package.json | 27 +++++++++++++-------------- webpack.config.js | 10 +++++----- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 972dc4fa..f022987b 100644 --- a/package.json +++ b/package.json @@ -25,29 +25,28 @@ "postinstall": "npm run webdriver-update" }, "dependencies": { - "@angular/common": "2.4.7", - "@angular/compiler": "2.4.7", - "@angular/core": "2.4.7", - "@angular/forms": "2.4.7", - "@angular/http": "2.4.7", - "@angular/platform-browser": "2.4.7", - "@angular/platform-browser-dynamic": "2.4.7", - "@angular/router": "3.4.7", + "@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/platform-browser": "4.0.0", + "@angular/platform-browser-dynamic": "4.0.0", + "@angular/router": "4.0.0", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", - "rxjs": "5.0.1", - "zone.js": "^0.7.2" + "rxjs": "^5.0.1", + "zone.js": "^0.8.5" }, "devDependencies": { "@angularclass/hmr": "^1.0.1", "@angularclass/hmr-loader": "^3.0.2", - "@types/jasmine": "2.5.41", + "@types/jasmine": "^2.5.41", "@types/node": "^6.0.38", "@types/selenium-webdriver": "2.53.39", - "@types/lodash": "4.14.50", "angular2-template-loader": "^0.6.0", "autoprefixer": "^6.3.2", - "awesome-typescript-loader": "^3.0.0-beta.17", + "awesome-typescript-loader": "^3.1.2", "codelyzer": "2.0.0", "copy-webpack-plugin": "^4.0.0", "css-loader": "^0.26.1", @@ -81,7 +80,7 @@ "tslint": "^4.3.1", "tslint-loader": "^3.3.0", "typedoc": "^0.5.1", - "typescript": "2.0.10", + "typescript": "^2.2.1", "url-loader": "^0.5.6", "webpack": "2.2.1", "webpack-dev-server": "2.3.0" diff --git a/webpack.config.js b/webpack.config.js index f18b272b..93e0ced9 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -167,11 +167,11 @@ module.exports = function makeWebpackConfig() { }), // Workaround needed for angular 2 angular/angular#11580 - new webpack.ContextReplacementPlugin( - // The (\\|\/) piece accounts for path separators in *nix and Windows - /angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/, - root('./src') // location of your src - ), + new webpack.ContextReplacementPlugin( + // The (\\|\/) piece accounts for path separators in *nix and Windows + /angular(\\|\/)core(\\|\/)@angular/, + root('./src') // location of your src + ), // Tslint configuration for webpack 2 new webpack.LoaderOptionsPlugin({ From a69970c14629ea15aa96064a071daf665fc47047 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Sun, 26 Mar 2017 18:55:37 +0200 Subject: [PATCH 66/67] update readme --- README.md | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index bf32240d..5f91819a 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,27 @@ -# angular2-webpack +# angular-webpack -[![Dependency Status](https://david-dm.org/preboot/angular2-webpack/status.svg)](https://david-dm.org/preboot/angular2-webpack#info=dependencies) [![devDependency Status](https://david-dm.org/preboot/angular2-webpack/dev-status.svg)](https://david-dm.org/preboot/angular2-webpack#info=devDependencies) -[![Join the chat at https://gitter.im/preboot/angular2-webpack](https://badges.gitter.im/preboot/angular2-webpack.svg)](https://gitter.im/preboot/angular2-webpack?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Dependency Status](https://david-dm.org/preboot/angular-webpack/status.svg)](https://david-dm.org/preboot/angular-webpack#info=dependencies) [![devDependency Status](https://david-dm.org/preboot/angular-webpack/dev-status.svg)](https://david-dm.org/preboot/angular-webpack#info=devDependencies) +[![Join the chat at https://gitter.im/preboot/angular-webpack](https://badges.gitter.im/preboot/angular-webpack.svg)](https://gitter.im/preboot/angular-webpack?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -A complete, yet simple, starter for Angular 2 using Webpack. +A complete, yet simple, starter for Angular v2+ using Webpack. -This seed repo serves as an Angular 2 starter for anyone looking to get up and running with Angular 2 and TypeScript fast. Using [Webpack](http://webpack.github.io/) for building our files and assisting with boilerplate. We're also using Protractor for our end-to-end story and Karma for our unit tests. -* Best practices in file and application organization for [Angular 2](https://angular.io/). +This seed repo serves as an Angular starter for anyone looking to get up and running with Angular and TypeScript fast. Using [Webpack](http://webpack.github.io/) for building our files and assisting with boilerplate. We're also using Protractor for our end-to-end story and Karma for our unit tests. +* Best practices in file and application organization for [Angular](https://angular.io/). * Ready to go build system using [Webpack](https://webpack.github.io/docs/) for working with [TypeScript](http://www.typescriptlang.org/). -* Testing Angular 2 code with [Jasmine](http://jasmine.github.io/) and [Karma](http://karma-runner.github.io/). +* Testing Angular code with [Jasmine](http://jasmine.github.io/) and [Karma](http://karma-runner.github.io/). * Coverage with [Istanbul](https://github.com/gotwarlost/istanbul) -* End-to-end Angular 2 code using [Protractor](https://angular.github.io/protractor/). +* End-to-end Angular code using [Protractor](https://angular.github.io/protractor/). * Stylesheets with [SASS](http://sass-lang.com/) (not required, it supports regular css too). * Error reported with [TSLint](http://palantir.github.io/tslint/) and [Codelyzer](https://github.com/mgechev/codelyzer). * Documentation with [TypeDoc](http://typedoc.org/). >Warning: Make sure you're using the latest version of Node.js and NPM -[Is Angular 2 Ready Yet?](http://splintercode.github.io/is-angular-2-ready/) - ### Quick start -> Clone/Download the repo then edit `app.ts` inside [`/src/app/app.component.ts`](/src/app/app.component.ts) - ```bash # clone our repo -$ git clone https://github.com/preboot/angular2-webpack.git my-app +$ git clone https://github.com/preboot/angular-webpack.git my-app # change directory to your app $ cd my-app @@ -57,7 +53,7 @@ go to [http://localhost:8080](http://localhost:8080) in your browser. What you need to run this app: * `node` and `npm` (Use [NVM](https://github.com/creationix/nvm)) -* Ensure you're running Node (`v5.x.x`+) and NPM (`3.x.x`+) +* Ensure you're running Node (`v6.x.x`+) and NPM (`3.x.x`+) ## Installing @@ -117,19 +113,19 @@ You can generate api docs (using [TypeDoc](http://typedoc.org/)) for your code w No, Webpack will add all the needed Javascript bundles as script tags and all the CSS files as link tags. The advantage is that you don't need to modify the index.html every time you build your solution to update the hashes. -#### How to include external angular 2 libraries ? +#### How to include external angular libraries ? -It's simple, just install the lib via npm and import it in your code when you need it. Don't forget that you need to configure some external libs in the [bootstrap](https://github.com/preboot/angular2-webpack/blob/master/src/main.ts) of your application. +It's simple, just install the lib via npm and import it in your code when you need it. Don't forget that you need to configure some external libs in the [bootstrap](https://github.com/preboot/angular-webpack/blob/master/src/main.ts) of your application. #### How to include external css files such as bootstrap.css ? -Just install the lib and import the css files in [vendor.ts](https://github.com/preboot/angular2-webpack/blob/master/src/vendor.ts). For example this is how to do it with bootstrap: +Just install the lib and import the css files in [vendor.ts](https://github.com/preboot/angular-webpack/blob/master/src/vendor.ts). For example this is how to do it with bootstrap: ```sh npm install bootstrap@next --save ``` -And in [vendor.ts](https://github.com/preboot/angular2-webpack/blob/master/src/vendor.ts) add the following: +And in [vendor.ts](https://github.com/preboot/angular-webpack/blob/master/src/vendor.ts) add the following: ```ts import 'bootstrap/dist/css/bootstrap.css'; From 51c72e481eecdaa461b8c3a1f021d2f2064e4b80 Mon Sep 17 00:00:00 2001 From: Jesus Rodriguez Date: Thu, 13 Jul 2017 12:13:50 +0200 Subject: [PATCH 67/67] update dependencies --- package.json | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index f022987b..27ea2952 100644 --- a/package.json +++ b/package.json @@ -25,18 +25,19 @@ "postinstall": "npm run webdriver-update" }, "dependencies": { - "@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/platform-browser": "4.0.0", - "@angular/platform-browser-dynamic": "4.0.0", - "@angular/router": "4.0.0", + "@angular/common": "~4.2.6", + "@angular/compiler": "~4.2.6", + "@angular/core": "~4.2.6", + "@angular/forms": "~4.2.6", + "@angular/http": "~4.2.6", + "@angular/platform-browser": "~4.2.6", + "@angular/platform-browser-dynamic": "~4.2.6", + "@angular/router": "~4.2.6", "core-js": "^2.4.1", "reflect-metadata": "^0.1.3", + "tslib": "^1.7.1", "rxjs": "^5.0.1", - "zone.js": "^0.8.5" + "zone.js": "^0.8.10" }, "devDependencies": { "@angularclass/hmr": "^1.0.1", @@ -49,7 +50,7 @@ "awesome-typescript-loader": "^3.1.2", "codelyzer": "2.0.0", "copy-webpack-plugin": "^4.0.0", - "css-loader": "^0.26.1", + "css-loader": "^0.28.4", "extract-text-webpack-plugin": "^2.0.0-beta.4", "file-loader": "^0.10.0", "html-loader": "^0.4.0", @@ -80,7 +81,7 @@ "tslint": "^4.3.1", "tslint-loader": "^3.3.0", "typedoc": "^0.5.1", - "typescript": "^2.2.1", + "typescript": "^2.3.1", "url-loader": "^0.5.6", "webpack": "2.2.1", "webpack-dev-server": "2.3.0"