Skip to content

Commit

Permalink
Merge pull request #95 from sbolel/chore/update-angular2-final
Browse files Browse the repository at this point in the history
chore(package): angular@2.0.0, webpack@2.1.0-beta22, devDependencies
  • Loading branch information
r-park committed Sep 21, 2016
2 parents 36396f3 + 3dd9e2d commit 1a45441
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 38 deletions.
49 changes: 25 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,59 +32,60 @@
"test:watch": "cross-env NODE_ENV=test karma start --reporters dots"
},
"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/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"@angular/router": "3.0.0-rc.1",
"angularfire2": "2.0.0-beta.4",
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0",
"angularfire2": "2.0.0-beta.5",
"core-js": "~2.4.1",
"firebase": "3.3.0",
"rxjs": "5.0.0-beta.6",
"zone.js": "~0.6.17"
"rxjs": "5.0.0-beta.12",
"zone.js": "~0.6.25"
},
"devDependencies": {
"@types/core-js": "~0.9.32",
"@types/jasmine": "~2.2.33",
"@types/node": "~6.0.38",
"@types/core-js": "~0.9.33",
"@types/jasmine": "~2.2.34",
"@types/node": "~6.0.39",
"@types/request": "0.0.30",
"autoprefixer": "~6.4.1",
"coveralls": "~2.11.12",
"coveralls": "~2.11.14",
"cross-env": "~2.0.1",
"css-loader": "~0.25.0",
"del-cli": "~0.2.0",
"eslint": "~3.4.0",
"eslint": "~3.5.0",
"express": "~4.14.0",
"extract-text-webpack-plugin": "~1.0.1",
"extract-text-webpack-plugin": "2.0.0-beta.4",
"firebase-tools": "3.0.7",
"html-webpack-plugin": "~2.22.0",
"istanbul-instrumenter-loader": "~0.2.0",
"jasmine-core": "~2.5.0",
"karma": "~1.2.0",
"jasmine-core": "~2.5.2",
"karma": "~1.3.0",
"karma-chrome-launcher": "~2.0.0",
"karma-coverage": "~1.1.1",
"karma-jasmine": "~1.0.2",
"karma-mocha-reporter": "~2.1.0",
"karma-mocha-reporter": "~2.2.0",
"karma-sourcemap-loader": "~0.3.7",
"karma-webpack": "~1.8.0",
"minx": "r-park/minx.git",
"morgan": "~1.7.0",
"node-sass": "~3.9.3",
"node-sass": "~3.10.0",
"nodemon": "~1.10.2",
"npm-run-all": "~3.1.0",
"postcss-loader": "~0.13.0",
"raw-loader": "~0.5.1",
"remap-istanbul": "~0.6.4",
"sass-loader": "~4.0.1",
"sass-loader": "~4.0.2",
"style-loader": "~0.13.1",
"ts-helpers": "~1.1.1",
"ts-loader": "~0.8.2",
"tslint": "~3.15.1",
"typescript": "~2.0.0",
"typescript": "~2.0.2",
"typings": "~1.3.3",
"webpack": "~1.13.2",
"webpack-dev-server": "~1.15.1",
"webpack": "2.1.0-beta.22",
"webpack-dev-server": "2.1.0-beta.4",
"webpack-md5-hash": "~0.0.5",
"winston": "~2.2.0",
"yargs": "~5.0.0"
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/app.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import { AuthService } from 'src/auth';
import { AuthService } from '../../auth';


@Component({
Expand All @@ -11,7 +11,7 @@ import { AuthService } from 'src/auth';
<app-header
[authenticated]="auth.authenticated"
(signOut)="signOut()"></app-header>
<main class="main">
<router-outlet></router-outlet>
</main>
Expand Down
12 changes: 7 additions & 5 deletions src/auth/services/auth-service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addProviders, inject } from '@angular/core/testing';
import { inject, TestBed } from '@angular/core/testing';
import { Subject } from 'rxjs/Subject';
import { AuthProviders, FirebaseAuth, FirebaseAuthState } from 'angularfire2';
import { AuthService } from './auth-service';
Expand All @@ -24,10 +24,12 @@ describe('auth/', () => {
authSubject.subscribe(callback);
});

addProviders([
{provide: FirebaseAuth, useValue: mockFirebaseAuth},
AuthService
]);
TestBed.configureTestingModule({
providers: [
{provide: FirebaseAuth, useValue: mockFirebaseAuth},
AuthService
]
});

inject([AuthService], (service: AuthService) => {
authService = service;
Expand Down
2 changes: 1 addition & 1 deletion src/tasks/services/task-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Injectable } from '@angular/core';
import { AngularFire, FirebaseListObservable } from 'angularfire2';
import { Observable } from 'rxjs/Observable';
import { ReplaySubject } from 'rxjs/ReplaySubject';
import { AuthService } from 'src/auth';
import { AuthService } from '../../auth';
import { ITask, Task } from '../models/task';


Expand Down
3 changes: 0 additions & 3 deletions src/vendor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@ import 'rxjs/add/operator/map';
import 'rxjs/add/operator/pluck';
import 'rxjs/add/operator/switchMap';
import 'rxjs/add/operator/take';

// AngularFire2
import 'angularfire2';
15 changes: 12 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,16 @@ config.module = {
config.plugins = [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(NODE_ENV)
})
}),

/** Fix for angular2 critical dependency warning
* https://github.com/r-park/todo-angular2-firebase/issues/96
*/
new webpack.ContextReplacementPlugin(
// The (\\|\/) piece accounts for path separators in *nix and Windows
/angular(\\|\/)core(\\|\/)(esm(\\|\/)src|src)(\\|\/)linker/,
path.resolve('src')
)
];

config.postcss = [
Expand Down Expand Up @@ -162,10 +171,10 @@ if (ENV_PRODUCTION) {
config.plugins.push(
new WebpackMd5Hash(),
new ExtractTextPlugin('styles.[contenthash].css'),
new webpack.optimize.DedupePlugin(),
// TODO: DedupePlugin is broken on webpack2-beta22
// new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
mangle: {
keep_fnames: true, // eslint-disable-line camelcase
screw_ie8: true // eslint-disable-line camelcase
},
compress: {
Expand Down

0 comments on commit 1a45441

Please sign in to comment.