Merge pull request #265 from joefitter/bugfix/conditional-coverage
dont run coverage if publishing
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
"test": "mocha-webpack \"src/**/*.ts\"",
|
||||
"test.coverage": "nyc npm test",
|
||||
"test.watch": "npm test -- --watch",
|
||||
"prepublishOnly": "npm run build",
|
||||
"prepublishOnly": "npm run build --production",
|
||||
"lint": "tslint --project .",
|
||||
"build": "npm run webpack && npm run fix-types",
|
||||
"tsc": "rimraf ./build && tsc -p .",
|
||||
|
@ -22,14 +22,17 @@ module.exports = {
|
||||
test: /\.ts$/,
|
||||
loaders: ["awesome-typescript-loader"],
|
||||
},
|
||||
{
|
||||
// For coverage testing
|
||||
...(process.env.NODE_ENV !== "production"
|
||||
? [{
|
||||
test: /\.(ts)/,
|
||||
include: path.resolve("src"),
|
||||
loader: "istanbul-instrumenter-loader",
|
||||
enforce: "post",
|
||||
exclude: [/node_modules/],
|
||||
},
|
||||
}]
|
||||
: []
|
||||
)
|
||||
],
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user