Skip to content

Commit

Permalink
Merge pull request #27 from bcoe/upgrade-tap
Browse files Browse the repository at this point in the history
upgrade tap
  • Loading branch information
bcoe committed Jun 4, 2015
2 parents 28972ad + c1b14d9 commit be12ccc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 20 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
sudo: false
language: node_js
node_js:
- '0.12'
- '0.10'
- iojs
- '0.12'
- '0.10'
- iojs
env:
- secure: "SVg7NpV0Sru296kdp+eFl07RFjtJy242fWQ1KDCUdk/1EtZEOzBoSKP7Tn3zX/VLBieexL0T31EwYvRztnL97Sr8VgpYU0z95vCPO8FrixElJR6NH3dqrKeNzC3xOYdV0fy2b4UMlPJOI0aYDT1KHm1aWtkb2J8zqII+XbMtlDaelfHCDxa2+RBII9nYYDP62z+0chQFS6MGPSNwve3G2emYHZpYP5iTFmOzaFUCAjLskKvnnsY0jyx5XssqAo17747WKZl5SDgN8YHZIwhE5tB9m9j3MGjJhwdsR3kmq2om0GD1tQFFAXzWhWad3zNBUE4fLqswgASi39o5NIEzvSRzpw77ttOkkIFGem0l421Zi25W8x5n6GZvP06Y47ddmjNBlniwIzG4fb3dbIByCy/g5SjUYmfnke7stXXBKsPv0eEadlLGFWnG5RIfnyGjvUgQ//QXSAnBBzYF9IK+KUdU8c9kHF6kPybsGEzjQoX+4EJL6kZ4sNX9qxjHERUr4Jb6rAMOnKI9VtCBNqwcCC3nV5DDWHS86hKwbuTbBFkszP7majOi0kUQJTO/tZGwVVcphSDwhL5QkmMepLOqXyRICdUcB2ffXHYhZLiZPofYdom8csaDolqFkotJEBj3GM3gwHvUC3i1vxshxtjF6NHjanhpiIpHLRCs6R1RESE="
after_success: npm run coverage
5 changes: 3 additions & 2 deletions bin/nyc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ if (process.env.NYC_CWD) {
yargs
.option('r', {
alias: 'reporter',
describe: 'coverage reporter to use',
default: 'text'
describe: 'coverage reporter(s) to use',
default: 'text',
array: true
})
.help('h')
.example('$0 report --reporter=lcov', 'output an HTML lcov report to ./coverage')
Expand Down
12 changes: 4 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function NYC (opts) {
),
tempDirectory: './.nyc_output',
cwd: process.env.NYC_CWD || process.cwd(),
reporter: 'text',
reporter: ['text'],
istanbul: require('istanbul')
}, opts)

Expand Down Expand Up @@ -113,13 +113,9 @@ NYC.prototype.report = function (_collector, _reporter) {
collector.add(report)
})

if (Array.isArray(this.reporter)) {
this.reporter.forEach(function (_reporter) {
reporter.add(_reporter)
})
} else {
reporter.add(this.reporter)
}
this.reporter.forEach(function (_reporter) {
reporter.add(_reporter)
})

reporter.write(collector, true, function () {})
}
Expand Down
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"description": "a code coverage tool that works well with subprocesses.",
"main": "index.js",
"scripts": {
"test": "standard && ./bin/nyc.js tap ./test/nyc-test.js",
"coverage": "./bin/nyc.js report --reporter=text-lcov | coveralls"
"test": "standard && tap --coverage ./test/nyc-test.js"
},
"bin": {
"nyc": "./bin/nyc.js"
Expand Down Expand Up @@ -47,11 +46,10 @@
"yargs": "^3.8.0"
},
"devDependencies": {
"chai": "^2.3.0",
"coveralls": "^2.11.2",
"chai": "^3.0.0",
"sinon": "^1.14.1",
"standard": "^3.7.3",
"tap": "1.0.4"
"standard": "^4.0.1",
"tap": "^1.2.0"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit be12ccc

Please sign in to comment.