Skip to content

Commit 13aef63

Browse files
committed
Adding source map support
This means that all code will have source map support for tests.
1 parent 8c9c8c1 commit 13aef63

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
"clean": "rm -rf build coverage *.js *.d.ts",
1717
"precompile": "npm run clean",
1818
"compile": "find src test typings -name \"*.ts\" | xargs tsc --declaration --module commonjs --target es5 --noImplicitAny --outDir build",
19-
"prelint": "npm run compile",
19+
"prelint": "npm run compile -- --sourceMap",
2020
"lint": "find src test -name \"*.ts\" | sed 's/^/--file=/g' | xargs tslint",
21-
"pretest": "npm run lint",
21+
"pretest": "npm run lint && find build -type f -name *.js -exec sed -i .bak -e '1s/^/require(\"source-map-support\").install();/' {} \\;",
2222
"test": "mocha --reporter ${MOCHA_REPORTER-nyan} --slow 10 --ui tdd --recursive build/**/*_test.js",
2323
"typings": "tsd reinstall && tsd rebundle"
2424
},
@@ -40,6 +40,7 @@
4040
"dts-generator": "^1.4.1",
4141
"mocha": "^2.2.4",
4242
"sinon": "^1.14.1",
43+
"source-map-support": "^0.2.10",
4344
"tsd": "^0.6.0-beta.5",
4445
"tslint": "^2.1.1",
4546
"typescript": "^1.4.1"

0 commit comments

Comments
 (0)