Skip to content

Commit abeb7e2

Browse files
Merge pull request #64 from RobotlegsJS/tsconfig
Update TypeScript Compiler Options
2 parents 73b7384 + 96239c4 commit abeb7e2

20 files changed

+96
-77
lines changed

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
.idea
22
.nyc_output
3-
build
4-
dev
3+
coverage
4+
dist/lib
5+
dist-test
56
lib
7+
lib-test
68
node_modules
7-
typings
8-
coverage
9-
inversify.d.ts
109
*.as
1110
*.iml
1211
src/**/*.js
1312
src/**/*.js.map
1413
test/**/*.js
1514
test/**/*.js.map
1615
npm-debug.log
16+
yarn-error.log

.npmignore

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
/.nyc_output
33
/.vscode
44
/coverage
5-
/dev
65
/dist
6+
/dist-test
77
/docs
8-
/lib/test
8+
/lib-test
99
/not-ported-extensions
1010
/src
1111
/test
@@ -15,22 +15,17 @@ CODE_OF_CONDUCT.md
1515
CONTRIBUTING.md
1616
ISSUE_TEMPLATE.md
1717
PULL_REQUEST_TEMPLATE.md
18-
bower.json
1918
karma.conf.js
2019
tsconfig.json
2120
tsconfig.test.json
22-
tsfmt.json
2321
tslint.json
24-
typings.json
22+
tslint.test.json
2523
webpack.config.js
2624
yarn.lock
27-
.codeclimate.yml
2825
.editorconfig
29-
.eslintignore
30-
.eslintrc
3126
.gitignore
3227
.istanbul.yml
3328
.npmignore
3429
.prettierrc
3530
.publishrc
36-
.travis.yml
31+
.travis.yml

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818

1919
### v0.1.1
2020

21-
- Update TypeScript Compiler Options (see #55).
21+
- Update TypeScript Compiler Options (see #55, $64).
22+
23+
- Use [tslib](https://github.com/Microsoft/tslib) library to avoid duplicated declarations (see #64).
2224

2325
- Enforce TSLint rules (see #54).
2426

karma.conf.js

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
process.env.TEST = true;
2-
process.env.NODE_ENV = 'test';
2+
process.env.NODE_ENV = "test";
33

4-
const webpack = require("webpack");
5-
const path = require("path");
6-
const webpackConfig = require('./webpack.config.js')({ production: false, karma: true });
4+
const webpackConfig = require("./webpack.config.js")({ production: false, karma: true });
75

86
delete webpackConfig.entry;
97

10-
module.exports = function(config) {
8+
module.exports = config => {
119

1210
var configuration = {
1311
basePath: "",
@@ -18,13 +16,10 @@ module.exports = function(config) {
1816
"es6-shim"
1917
],
2018
files: [
21-
"./test/**/**/**.test.ts",
22-
{
23-
pattern: '**/*.map',
24-
served: true,
25-
included: false,
26-
watched: true
27-
}
19+
{ pattern: "node_modules/reflect-metadata/Reflect.js", include: true },
20+
{ pattern: "node_modules/bluebird/js/browser/bluebird.js", include: true },
21+
{ pattern: "./test/**/**/**.test.ts", include: true },
22+
{ pattern: '**/*.map', served: true, included: false, watched: true }
2823
],
2924
preprocessors: {
3025
"./**/**/**/**.ts": ["sourcemap"],
@@ -65,14 +60,14 @@ module.exports = function(config) {
6560
colors: true,
6661
logLevel: config.LOG_INFO,
6762
autoWatch: true,
68-
browsers: ['Chrome']
63+
browsers: []
6964
};
7065

7166
if (process.env.TRAVIS) {
72-
configuration.browsers = ['PhantomJS'];
67+
configuration.browsers.push("PhantomJS");
7368
configuration.plugins.push("karma-phantomjs-launcher");
7469
} else {
75-
configuration.browsers = ['PhantomJS'];
70+
configuration.browsers.push("PhantomJS");
7671
configuration.plugins.push("karma-phantomjs-launcher");
7772
}
7873

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
"tslint:src": "tslint --project tsconfig.json",
1414
"tslint:test": "tslint --config tslint.test.json --project tsconfig.test.json",
1515
"tslint": "npm run tslint-check:src && npm run tslint-check:test && npm run tslint:src && npm run tslint:test",
16-
"clean-up": "rimraf .nyc_output && rimraf coverage && rimraf lib",
17-
"compile": "tsc -d",
16+
"clean-up": "rimraf .nyc_output && rimraf coverage && rimraf lib && rimraf lib-test && rimraf dist-test",
17+
"compile:src": "tsc -d --importHelpers",
18+
"compile:test": "tsc -p tsconfig.test.json -d --importHelpers",
1819
"dev": "webpack",
1920
"build": "webpack --env.production",
20-
"prepare": "npm run clean-up && npm run compile",
21+
"prepare": "npm run clean-up && npm run compile:src",
2122
"prepublishOnly": "publish-please guard",
2223
"publish-please": "npm run tslint && npm run autoformat && npm run clean-up && npm run test && publish-please"
2324
},
@@ -83,7 +84,6 @@
8384
"istanbul-instrumenter-loader": "^3.0.1",
8485
"karma": "^2.0.5",
8586
"karma-chai": "^0.1.0",
86-
"karma-chai-sinon": "^0.1.5",
8787
"karma-chrome-launcher": "^2.2.0",
8888
"karma-coverage-istanbul-reporter": "^2.0.1",
8989
"karma-es6-shim": "^1.0.0",
@@ -92,6 +92,7 @@
9292
"karma-phantomjs-launcher": "^1.0.4",
9393
"karma-remap-istanbul": "^0.6.0",
9494
"karma-sinon": "^1.0.5",
95+
"karma-sinon-chai": "^2.0.2",
9596
"karma-sourcemap-loader": "^0.3.7",
9697
"karma-sourcemap-writer": "^0.1.2",
9798
"karma-webpack": "^3.0.0",

test/robotlegs/bender/extensions/signalCommandMap/impl/signalCommandMap.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// in accordance with the terms of the license agreement accompanying it.
66
// ------------------------------------------------------------------------------
77

8-
import "../../../../../entry.ts";
8+
import "../../../../../entry";
99

1010
import { assert } from "chai";
1111

test/robotlegs/bender/extensions/signalCommandMap/impl/signalCommandMapIntegration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// in accordance with the terms of the license agreement accompanying it.
66
// ------------------------------------------------------------------------------
77

8-
import "../../../../../entry.ts";
8+
import "../../../../../entry";
99

1010
import { assert } from "chai";
1111

test/robotlegs/bender/extensions/signalCommandMap/impl/signalCommandTrigger.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// in accordance with the terms of the license agreement accompanying it.
66
// ------------------------------------------------------------------------------
77

8-
import "../../../../../entry.ts";
8+
import "../../../../../entry";
99

1010
import sinon = require("sinon");
1111

test/robotlegs/bender/extensions/signalCommandMap/signalCommandMapExtension.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// in accordance with the terms of the license agreement accompanying it.
66
// ------------------------------------------------------------------------------
77

8-
import "../../../../entry.ts";
8+
import "../../../../entry";
99

1010
import { assert } from "chai";
1111

test/robotlegs/bender/extensions/signalCommandMap/support/CascadingCommand.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ export class CascadingCommand implements ICommand {
2020
@named("executeCallback")
2121
public callback: Function;
2222

23-
@inject(IInjector) public injector: IInjector;
23+
@inject(IInjector)
24+
public injector: IInjector;
2425

25-
@inject(ISignalCommandMap) public signalCommandMap: ISignalCommandMap;
26+
@inject(ISignalCommandMap)
27+
public signalCommandMap: ISignalCommandMap;
2628

2729
public execute(): void {
2830
this.callback();

0 commit comments

Comments
 (0)