Skip to content

Commit 3bf01b6

Browse files
TheSharpieOneeddywashere
authored andcommitted
chore(coverage): Update instrumenter (#101)
* chore(coverage): Update instrumenter Replace isparta with istambul since isparta is no longer maintained See: https://github.com/douglasduteil/isparta Istambul now support es2015/6. (Also added cross-env to allow it to work on windows) * chore(deps): Move deps to devDeps
1 parent 18a2ef7 commit 3bf01b6

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

.babelrc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
{
2-
"presets": ["es2015", "stage-0", "react"]
2+
"presets": ["es2015", "stage-0", "react"],
3+
"env": {
4+
"test": {
5+
"plugins": [ "istanbul" ]
6+
}
7+
}
38
}

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"main": "lib/index.js",
66
"scripts": {
77
"coverage": "coveralls < ./test/coverage/lcov/lcov.info",
8-
"test": "npm run lint && karma start --single-run --reporters spec,coverage",
8+
"test": "npm run lint && cross-env BABEL_ENV=test karma start --single-run --reporters spec,coverage",
99
"test-watch": "karma start --reporters dots,coverage",
1010
"start": "webpack-dev-server --config ./webpack.dev.config.js --watch",
11-
"build-docs": "WEBPACK_BUILD=production webpack --config ./webpack.dev.config.js --progress --colors",
12-
"build": "WEBPACK_BUILD=production webpack --progress --colors && webpack --progress --colors",
11+
"build-docs": "cross-env WEBPACK_BUILD=production webpack --config ./webpack.dev.config.js --progress --colors",
12+
"build": "cross-env WEBPACK_BUILD=production webpack --progress --colors && webpack --progress --colors",
1313
"prebuild": "babel src --out-dir lib",
1414
"create-release": "npm test && sh ./scripts/release",
1515
"publish-release": "npm test && sh ./scripts/publish",
@@ -44,7 +44,6 @@
4444
},
4545
"homepage": "https://github.com/reactstrap/reactstrap#readme",
4646
"dependencies": {
47-
"babel-cli": "^6.11.4",
4847
"classnames": "^2.2.3",
4948
"lodash.isfunction": "^3.0.8",
5049
"lodash.omit": "^4.4.1",
@@ -56,8 +55,10 @@
5655
"react-dom": "^0.14.0 || ^15.0.0"
5756
},
5857
"devDependencies": {
58+
"babel-cli": "^6.11.4",
5959
"babel-core": "^6.13.2",
6060
"babel-loader": "^6.2.2",
61+
"babel-plugin-istanbul": "^2.0.0",
6162
"babel-polyfill": "^6.13.0",
6263
"babel-preset-es2015": "^6.13.2",
6364
"babel-preset-react": "^6.5.0",
@@ -69,6 +70,7 @@
6970
"conventional-recommended-bump": "^0.2.0",
7071
"copy-webpack-plugin": "^3.0.1",
7172
"coveralls": "^2.11.12",
73+
"cross-env": "^2.0.0",
7274
"css-loader": "^0.23.1",
7375
"ejs": "^2.5.1",
7476
"enzyme": "^2.4.1",
@@ -80,7 +82,6 @@
8082
"eslint-plugin-standard": "^2.0.0",
8183
"extract-text-webpack-plugin": "^1.0.1",
8284
"history": "^3.0.0",
83-
"isparta-loader": "^2.0.0",
8485
"jasmine-core": "^2.4.1",
8586
"json-loader": "^0.5.4",
8687
"karma": "^1.1.2",

webpack.test.config.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ var webpackConfig = {
3838
},
3939
};
4040

41-
webpackConfig.module.preLoaders = webpackConfig.module.preLoaders || [];
42-
webpackConfig.module.preLoaders.push({
43-
test: /\.jsx?$/,
44-
exclude: /(test|node_modules)\//,
45-
loader: 'isparta'
46-
});
4741
webpackConfig.webpackServer = {
4842
noInfo: true
4943
};

0 commit comments

Comments
 (0)