diff --git a/.gitignore b/.gitignore index 3c3629e..16628a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ node_modules +coverage +nyc_output diff --git a/.travis.yml b/.travis.yml index dedfc07..3da5271 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,3 +4,4 @@ node_js: - 'iojs' - '0.12' - '0.10' +after_success: npm run coveralls diff --git a/package.json b/package.json index 68c75f1..3d0b3e7 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,9 @@ }, "scripts": { "test": "mocha", - "bench": "matcha benchmark.js" + "bench": "matcha benchmark.js", + "coverage": "nyc npm test && nyc report", + "coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls" }, "files": [ "index.js" @@ -47,8 +49,10 @@ "supports-color": "^1.3.0" }, "devDependencies": { + "coveralls": "^2.11.2", "matcha": "^0.6.0", "mocha": "*", + "nyc": "^2.1.4", "require-uncached": "^1.0.2", "resolve-from": "^1.0.0", "semver": "^4.3.3" diff --git a/readme.md b/readme.md index 30f6564..75db54c 100644 --- a/readme.md +++ b/readme.md @@ -8,6 +8,8 @@ > Terminal string styling done right [![Build Status](https://travis-ci.org/sindresorhus/chalk.svg?branch=master)](https://travis-ci.org/sindresorhus/chalk) [![](http://img.shields.io/badge/unicorn-approved-ff69b4.svg)](https://www.youtube.com/watch?v=9auOCbH5Ns4) +[![Coverage Status](https://coveralls.io/repos/sindresorhus/chalk/badge.svg?branch=)](https://coveralls.io/r/sindresorhus/chalk?branch=) + [colors.js](https://github.com/Marak/colors.js) used to be the most popular string styling module, but it has serious deficiencies like extending `String.prototype` which causes all kinds of [problems](https://github.com/yeoman/yo/issues/68). Although there are other ones, they either do too much or not enough.