Skip to content

Commit 6f92500

Browse files
committed
feat(core): update angular-cli to 1.0.0-rc.0
1 parent 3a7ef7e commit 6f92500

File tree

9 files changed

+93
-32
lines changed

9 files changed

+93
-32
lines changed

.angular-cli.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"project": {
3-
"version": "1.0.0-beta.32.3",
3+
"version": "1.0.0-rc.0",
44
"name": "shardis"
55
},
66
"apps": [
@@ -15,7 +15,8 @@
1515
"main": "main.ts",
1616
"polyfills": "polyfills.ts",
1717
"test": "test.ts",
18-
"tsconfig": "tsconfig.json",
18+
"tsconfig": "tsconfig.app.json",
19+
"testTsconfig": "tsconfig.spec.json",
1920
"prefix": "shardis",
2021
"styles": [
2122
"../../../node_modules/clarity-icons/clarity-icons.min.css",
@@ -38,12 +39,13 @@
3839
},
3940
"lint": [
4041
{
41-
"files": "src/main/typescript/**/*.ts",
42-
"project": "src/main/typescript/tsconfig.json"
42+
"project": "src/tsconfig.app.json"
4343
},
4444
{
45-
"files": "e2e/**/*.ts",
46-
"project": "e2e/tsconfig.json"
45+
"project": "src/tsconfig.spec.json"
46+
},
47+
{
48+
"project": "e2e/tsconfig.e2e.json"
4749
}
4850
],
4951
"test": {
@@ -67,5 +69,6 @@
6769
"service": true
6870
}
6971
},
70-
"packageManager": "yarn"
72+
"packageManager": "npm",
73+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json"
7174
}
Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
{
2-
"compileOnSave": false,
32
"compilerOptions": {
3+
"sourceMap": true,
44
"declaration": false,
5+
"moduleResolution": "node",
56
"emitDecoratorMetadata": true,
67
"experimentalDecorators": true,
78
"lib": [
8-
"es6",
9+
"es2016",
910
"dom"
1011
],
11-
"module": "commonjs",
12-
"moduleResolution": "node",
13-
"noImplicitAny": true,
14-
"suppressImplicitAnyIndexErrors": true,
1512
"outDir": "../src/main/resources/static/out-tsc-e2e",
16-
"sourceMap": true,
17-
"target": "es5",
13+
"module": "commonjs",
14+
"target": "es6",
15+
"types": [
16+
"jasmine",
17+
"node"
18+
],
1819
"typeRoots": [
1920
"../node_modules/@types"
20-
]
21+
],
22+
"noImplicitAny": true,
23+
"suppressImplicitAnyIndexErrors": true
2124
}
2225
}

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"zone.js": "0.7.7"
4343
},
4444
"devDependencies": {
45-
"@angular/cli": "1.0.0-beta.32.3",
45+
"@angular/cli": "1.0.0-rc.0",
4646
"@angular/compiler-cli": "2.4.8",
4747
"@types/jasmine": "2.5.43",
4848
"@types/node": "7.0.5",
@@ -57,6 +57,7 @@
5757
"karma-cli": "1.0.1",
5858
"karma-coverage-istanbul-reporter": "0.2.3",
5959
"karma-jasmine": "1.1.0",
60+
"karma-jasmine-html-reporter": "0.2.2",
6061
"npm-check": "5.4.0",
6162
"protractor": "5.1.1",
6263
"rimraf": "2.6.1",
@@ -72,7 +73,7 @@
7273
"preclean:start": "npm run clean",
7374
"clean:start": "npm start",
7475
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
75-
"docs": "compodoc -n Shardis -n Shardis -r 9999 -p src/main/typescript/tsconfig.json",
76+
"docs": "compodoc -n Shardis -r 9999 -p src/main/typescript/tsconfig.app.json",
7677
"e2e": "ng e2e",
7778
"e2e:live": "ng e2e --elementExplorer",
7879
"lint": "ng lint",

protractor.conf.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// https://github.com/angular/protractor/blob/master/lib/config.ts
33

44
/*global jasmine */
5-
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
5+
const {SpecReporter} = require('jasmine-spec-reporter');
66

77
exports.config = {
88
allScriptsTimeout: 11000,
@@ -24,10 +24,10 @@ exports.config = {
2424
useAllAngular2AppRoots: true,
2525
beforeLaunch: function () {
2626
require('ts-node').register({
27-
project: 'e2e'
27+
project: 'e2e/tsconfig.e2e.json'
2828
});
2929
},
3030
onPrepare: function () {
31-
jasmine.getEnv().addReporter(new SpecReporter());
31+
jasmine.getEnv().addReporter(new SpecReporter({spec: {displayStacktrace: true}}));
3232
}
3333
};

src/main/typescript/app/core/store/auth/auth.reducer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export function authReducer(state = initialState, action: Actions): AuthState {
2323
case ActionTypes.PROCESS_TOKEN:
2424
const processTokenAction: ProcessTokenAction = action as ProcessTokenAction;
2525
const userData = decodeAccessToken(processTokenAction.payload);
26+
console.log('userdata is ', userData);
2627
return (!userData) ? state : Object.assign({}, initialState, {
2728
authenticated: true,
2829
tokenExpirationDate: new Date(userData.exp * 1000),
@@ -32,10 +33,10 @@ export function authReducer(state = initialState, action: Actions): AuthState {
3233

3334
case ActionTypes.AUTH_ERROR:
3435
const authErrorAction: AuthErrorAction = action as AuthErrorAction;
35-
return Object.assign({}, userData, {error: authErrorAction.payload});
36+
return Object.assign({}, state, {error: authErrorAction.payload});
3637

3738
case ActionTypes.CLEAR_AUTH_ERROR:
38-
return Object.assign({}, userData, {error: null});
39+
return Object.assign({}, state, {error: null});
3940

4041
default:
4142
return state;
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
{
22
"compilerOptions": {
3-
"baseUrl": "",
3+
"sourceMap": true,
44
"declaration": false,
5+
"moduleResolution": "node",
56
"emitDecoratorMetadata": true,
67
"experimentalDecorators": true,
78
"lib": [
8-
"es6",
9+
"es2016",
910
"dom"
1011
],
12+
"outDir": "../out-tsc/app",
13+
"target": "es5",
14+
"module": "es2015",
15+
"baseUrl": "",
16+
"types": [],
1117
"mapRoot": "./",
12-
"module": "es6",
13-
"moduleResolution": "node",
1418
"noImplicitAny": true,
1519
"suppressImplicitAnyIndexErrors": true,
16-
"outDir": "../../../src/main/resources/static/out-tsc",
17-
"sourceMap": true,
18-
"target": "es5",
1920
"typeRoots": [
2021
"../../../node_modules/@types"
2122
]
22-
}
23+
},
24+
"exclude": [
25+
"test.ts",
26+
"**/*.spec.ts"
27+
]
2328
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"compilerOptions": {
3+
"sourceMap": true,
4+
"declaration": false,
5+
"moduleResolution": "node",
6+
"emitDecoratorMetadata": true,
7+
"experimentalDecorators": true,
8+
"lib": [
9+
"es2016",
10+
"dom"
11+
],
12+
"outDir": "../out-tsc/spec",
13+
"module": "commonjs",
14+
"target": "es6",
15+
"baseUrl": "",
16+
"types": [
17+
"jasmine",
18+
"node"
19+
],
20+
"mapRoot": "./",
21+
"noImplicitAny": true,
22+
"suppressImplicitAnyIndexErrors": true,
23+
"typeRoots": [
24+
"../../../node_modules/@types"
25+
]
26+
},
27+
"files": [
28+
"test.ts"
29+
],
30+
"include": [
31+
"**/*.spec.ts"
32+
]
33+
}

tsconfig.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
"outDir": "./src/main/resources/static",
5+
"sourceMap": true,
6+
"declaration": false,
7+
"moduleResolution": "node",
8+
"emitDecoratorMetadata": true,
9+
"experimentalDecorators": true,
10+
"lib": [
11+
"es2016",
12+
"dom"
13+
]
14+
}
15+
}

tslint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"no-empty": false,
4747
"no-empty-interface": true,
4848
"no-eval": true,
49-
"no-inferrable-types": true,
49+
"no-inferrable-types": [true, "ignore-params"],
5050
"no-shadowed-variable": true,
5151
"no-string-literal": false,
5252
"no-string-throw": true,

0 commit comments

Comments
 (0)