diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..a462653 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1 @@ +repo_token: LkTCt0dj8vmeTDkJpIRkVeoTUoCkO3CUZ \ No newline at end of file diff --git a/.gitignore b/.gitignore index 491fc35..08d4046 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ node_modules lib +coverage +npm-debug.log diff --git a/README.md b/README.md index 51a30b5..0dbb3bd 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ previous-date-range Calculate a date range in the past from a certain moment [![Build status](https://api.travis-ci.org/jamiter/previous-date-range.png)](https://travis-ci.org/jamiter/previous-date-range) +[![Coverage Status](https://coveralls.io/repos/github/jamiter/previous-date-range/badge.svg)](https://coveralls.io/github/jamiter/previous-date-range) ## Installation diff --git a/package.json b/package.json index d6ff87f..32f0289 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "scripts": { "prepublish": "npm test -s", "build": "babel src -d lib", - "cover": "istanbul cover --report json _mocha -- -R spec --compilers js:babel-core/register './tests/**/*.js'", + "cover": "istanbul cover --report lcovonly _mocha -- -R spec --compilers js:babel-core/register './tests/**/*.js'", + "coveralls": "npm run cover && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage", "lint": "eslint ./src ./test", "mocha": "npm run build -s && _mocha -R spec --compilers js:babel-core/register './tests/**/*.js'", "start": "npm run build -s -- -w", @@ -35,6 +36,7 @@ "babel-plugin-transform-object-rest-spread": "^6.20.2", "babel-preset-env": "^1.1.8", "chai": "^3.5.0", + "coveralls": "^2.11.15", "eslint": "^3.13.1", "eslint-config-airbnb-base": "^11.0.1", "eslint-plugin-import": "^2.2.0",