Skip to content
This repository was archived by the owner on Jul 27, 2018. It is now read-only.

Commit 28f53d1

Browse files
authored
chore: Upgrade to Angular 2 RC.5 (#26)
BREAKING CHANGE: With the introduction of NgModules, the process for instrumenting your store has changed BEFORE: ```ts import { instrumentStore } from '@ngrx/store-devtools'; bootstrap(App, [ instrumentStore(config) ]); ``` AFTER: ```ts import { StoreDevtoolsModule } from '@ngrx/store-devtools'; @NgModule({ imports: [ StoreDevtoolsModule.instrumentStore(config) ] }) export class AppModule { } ```
1 parent dcd640c commit 28f53d1

23 files changed

+260
-276
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ __build__/**
5353
!/typings/custom.d.ts
5454

5555
# Build Artifacts #
56-
release
56+
release
57+
.ngc

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,18 @@ Devtools for [@ngrx/store](https://github.com/ngrx/store).
1111
To instrument @ngrx/store and use the devtools, you will need to setup the instrumentation providers using `instrumentStore()`:
1212

1313
```ts
14-
import {instrumentStore} from '@ngrx/store-devtools';
15-
16-
bootstrap(App, [
17-
provideStore(reducer),
18-
instrumentStore({
19-
monitor: monitorReducer,
20-
maxAge: 5
21-
})
22-
]);
14+
import {StoreDevtoolsModule} from '@ngrx/store-devtools';
15+
16+
@NgModule({
17+
imports: [
18+
StoreModule.provideStore(rootReducer),
19+
// Note that you must instrument after importing StoreModule
20+
StoreDevtoolsModule.instrumentStore({
21+
maxAge: 5,
22+
monitor: monitorReducer
23+
})
24+
]
25+
})
2326
```
2427

2528
See [@ngrx/store-log-monitor](https://github.com/ngrx/store-log-monitor) for an example monitor built for Angular 2

circle.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
machine:
2+
node:
3+
version: 6.4.0

karma.conf.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ module.exports = function(karma) {
99
frameworks: ['jasmine'],
1010

1111
files: [
12-
{ pattern: 'tests.js', watched: false }
12+
{ pattern: 'tests.ts', watched: false }
1313
],
1414

1515
exclude: [],
1616

1717
preprocessors: {
18-
'tests.js': ['coverage', 'webpack', 'sourcemap']
18+
'tests.ts': ['coverage', 'webpack', 'sourcemap']
1919
},
2020

2121
reporters: ['mocha', 'coverage'],
@@ -50,27 +50,21 @@ module.exports = function(karma) {
5050
{
5151
test: /\.ts?$/,
5252
exclude: /(node_modules)/,
53-
loader: 'ts-loader?target=es5&module=commonjs'
53+
loader: 'awesome-typescript'
5454
}
5555
],
5656
postLoaders: [
5757
{
5858
test: /\.(js|ts)$/, loader: 'istanbul-instrumenter-loader',
59-
include: path.resolve(__dirname, 'lib'),
59+
include: path.resolve(__dirname, 'src'),
6060
exclude: [
6161
/\.(e2e|spec)\.ts$/,
62+
/tests.ts$/,
6263
/node_modules/
6364
]
6465
}
6566
]
66-
},
67-
ts: {
68-
configFileName: './spec/tsconfig.json'
6967
}
70-
},
71-
72-
webpackServer: {
73-
noInfo: true
7468
}
7569
});
76-
};
70+
};

lib/config.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

lib/index.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

lib/instrument.ts

Lines changed: 0 additions & 85 deletions
This file was deleted.

package.json

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
{
22
"name": "@ngrx/store-devtools",
3-
"version": "2.0.0-beta.1",
3+
"version": "3.0.0",
44
"description": "Developer tools for @ngrx/store",
55
"main": "./index.js",
66
"scripts": {
77
"lint": "npm-run-all lint:*",
88
"lint:lib": "tslint lib/**/*.ts",
99
"lint:spec": "tslint spec/**/*.ts",
10-
"typings": "typings install",
1110
"clean": "npm-run-all clean:*",
1211
"clean:release": "rm -rf ./release",
13-
"clean:typings": "rm -rf ./typings",
14-
"prebuild": "npm-run-all clean typings karma",
15-
"build": "npm-run-all build:cjs build:es6",
16-
"build:cjs": "tsc --p tsconfig.es5.json --diagnostics --pretty",
17-
"build:es6": "tsc -m es2015 --outDir ./release/esm --target ES6 -d --diagnostics --pretty",
12+
"prebuild": "npm-run-all clean karma",
13+
"build": "npm-run-all build:cjs build:esm",
14+
"build:cjs": "ngc --p tsconfig.json",
15+
"build:esm": "ngc -p tsconfig.esm.json",
1816
"prepare": "npm-run-all prepare:*",
19-
"prepare:es6": "cp -R ./release/esm ./release/npm",
20-
"prepare:package": "cp ./{package.json,README.md,LICENSE} ./release/npm",
21-
"test": "npm-run-all clean typings karma",
17+
"prepare:ts": "cp -R ./src ./release",
18+
"prepare:package": "cp ./{package.json,README.md,LICENSE} ./release",
19+
"test": "npm-run-all clean karma",
2220
"karma": "karma start --single-run",
2321
"karma:watch": "karma start",
2422
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
@@ -57,13 +55,18 @@
5755
"@ngrx/store": "^2.0.0"
5856
},
5957
"devDependencies": {
60-
"@angular/common": "^2.0.0-rc.1",
61-
"@angular/compiler": "^2.0.0-rc.1",
62-
"@angular/core": "^2.0.0-rc.1",
63-
"@angular/platform-browser": "^2.0.0-rc.1",
64-
"@angular/platform-browser-dynamic": "^2.0.0-rc.1",
58+
"@angular/common": "^2.0.0-rc.5",
59+
"@angular/compiler": "^2.0.0-rc.5",
60+
"@angular/compiler-cli": "^0.5.0",
61+
"@angular/core": "^2.0.0-rc.5",
62+
"@angular/platform-browser": "^2.0.0-rc.5",
63+
"@angular/platform-browser-dynamic": "^2.0.0-rc.5",
64+
"@angular/platform-server": "^2.0.0-rc.5",
6565
"@ngrx/core": "^1.0.0",
66-
"@ngrx/store": "^2.0.0",
66+
"@ngrx/store": "^2.1.2",
67+
"@types/jasmine": "^2.2.33",
68+
"@types/node": "^6.0.38",
69+
"awesome-typescript-loader": "^2.2.1",
6770
"conventional-changelog-cli": "^1.1.1",
6871
"core-js": "^2.2.2",
6972
"istanbul-instrumenter-loader": "^0.2.0",
@@ -82,9 +85,8 @@
8285
"source-map-loader": "^0.1.5",
8386
"ts-loader": "^0.8.1",
8487
"tslint": "^3.6.0",
85-
"typescript": "^1.8.9",
86-
"typings": "^1.0.4",
87-
"webpack": "^1.12.14",
88-
"zone.js": "^0.6.8"
88+
"typescript": "^2.0.0",
89+
"webpack": "^2.1.0-beta.21",
90+
"zone.js": "0.6.12"
8991
}
9092
}

0 commit comments

Comments
 (0)