diff --git a/.gitignore b/.gitignore index ec43995..af1c85e 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ test/fixtures/*.json node_modules/ node_modules/* npm-debug.log +coverage \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 3b53ece..696701c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ node_js: - "0.10" - "0.12" - "4.1" + - "5" before_install: - travis_retry npm install npm -g @@ -15,6 +16,10 @@ before_install: script: - npm test +after_script: + - npm run cover + - npm run coveralls + matrix: allow_failures: - node_js: "0.10" diff --git a/README.md b/README.md index 6a90f19..8a73170 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # nconf -[![Version npm](https://img.shields.io/npm/v/nconf.svg?style=flat-square)](https://www.npmjs.com/package/nconf)[![npm Downloads](https://img.shields.io/npm/dm/nconf.svg?style=flat-square)](https://www.npmjs.com/package/nconf)[![Build Status](https://img.shields.io/travis/indexzero/nconf/master.svg?style=flat-square)](https://travis-ci.org/indexzero/nconf)[![Dependencies](https://img.shields.io/david/indexzero/nconf.svg?style=flat-square)](https://david-dm.org/indexzero/nconf) +[![Version npm](https://img.shields.io/npm/v/nconf.svg?style=flat-square)](https://www.npmjs.com/package/nconf)[![npm Downloads](https://img.shields.io/npm/dm/nconf.svg?style=flat-square)](https://www.npmjs.com/package/nconf)[![Build Status](https://img.shields.io/travis/indexzero/nconf/master.svg?style=flat-square)](https://travis-ci.org/indexzero/nconf)[![Coverage](https://img.shields.io/coveralls/indexzero/nconf.svg?style=flat-square)](https://coveralls.io/github/indexzero/nconf)[![Dependencies](https://img.shields.io/david/indexzero/nconf.svg?style=flat-square)](https://david-dm.org/indexzero/nconf) Hierarchical node.js configuration with files, environment variables, command-line arguments, and atomic object merging. diff --git a/package.json b/package.json index a1c13e1..ee96101 100644 --- a/package.json +++ b/package.json @@ -18,11 +18,15 @@ "yargs": "^3.19.0" }, "devDependencies": { + "coveralls": "^2.11.4", + "istanbul": "^0.4.1", "vows": "0.8.x" }, "main": "./lib/nconf", "scripts": { - "test": "vows test/*-test.js test/**/*-test.js --spec" + "test": "vows test/*-test.js test/**/*-test.js --spec", + "cover": "istanbul cover vows -- test/*-test.js test/**/*-test.js --spec", + "coveralls": "cat coverage/lcov.info | coveralls" }, "engines": { "node": ">= 0.4.0"