diff --git a/.gitignore b/.gitignore index 3c3629e..c9106a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +.nyc_output diff --git a/.travis.yml b/.travis.yml index e667b92..17f844e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,3 +3,4 @@ node_js: - 'iojs' - '0.12' - '0.10' +after_success: npm run coverage diff --git a/package.json b/package.json index 3580de7..9fc8cf3 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "node": ">=0.10.0" }, "scripts": { - "test": "xo && node test.js" + "test": "xo && nyc node test.js", + "coverage": "nyc --reporter=text-lcov node test.js | coveralls" }, "files": [ "index.js" @@ -56,6 +57,8 @@ "devDependencies": { "ava": "0.0.4", "chalk": "^1.1.0", + "coveralls": "^2.11.4", + "nyc": "^3.2.2", "strip-ansi": "^3.0.0", "xo": "*" } diff --git a/readme.md b/readme.md index 25b1554..fbe2a6d 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# wrap-ansi [![Build Status](https://travis-ci.org/chalk/wrap-ansi.svg?branch=master)](https://travis-ci.org/chalk/wrap-ansi) +# wrap-ansi [![Build Status](https://travis-ci.org/chalk/wrap-ansi.svg?branch=master)](https://travis-ci.org/chalk/wrap-ansi) [![Coverage Status](https://coveralls.io/repos/chalk/wrap-ansi/badge.svg?branch=master&service=github)](https://coveralls.io/github/chalk/wrap-ansi?branch=master) > Wordwrap a string with [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles)