diff --git a/.gitignore b/.gitignore index a03910fa..77fc65da 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ npm-debug.log /node_modules coverage .idea +.nyc_output diff --git a/.travis.yml b/.travis.yml index fee661d4..20b24a0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,3 +4,7 @@ node_js: - "7" - "6" - "4" + +after_success: + - npm install coveralls + - npm run coverage && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage diff --git a/package.json b/package.json index bcd8daf3..c44a8c13 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "test-source-map": "webpack-dev-server --config test/sourceMap/webpack.config.js --content-base ./test/sourceMap --inline", "test-watch": "webpack --config test/watch/webpack.config.js", "test-extract-text": "webpack --config test/extractText/webpack.config.js", - "test-hmr": "webpack-dev-server --config test/hmr/webpack.config.js --content-base ./test/hmr --hot --inline" + "test-hmr": "webpack-dev-server --config test/hmr/webpack.config.js --content-base ./test/hmr --hot --inline", + "coverage": "nyc --reporter=lcov npm test" }, "keywords": [ "sass", @@ -46,6 +47,7 @@ "file-loader": "^0.10.0", "mocha": "^3.0.2", "node-sass": "^4.5.0", + "nyc": "^10.1.2", "raw-loader": "^0.5.1", "should": "^11.2.0", "style-loader": "^0.13.1",