aboutsummaryrefslogtreecommitdiff
path: root/node_modules/nyc/lib/commands
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
commitbbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch)
treec58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/nyc/lib/commands
parent003fb34971cf63466184351b4db5f7c67df4f444 (diff)
update packages
Diffstat (limited to 'node_modules/nyc/lib/commands')
-rw-r--r--node_modules/nyc/lib/commands/instrument.js28
-rw-r--r--node_modules/nyc/lib/commands/report.js6
2 files changed, 31 insertions, 3 deletions
diff --git a/node_modules/nyc/lib/commands/instrument.js b/node_modules/nyc/lib/commands/instrument.js
index cf1e97461..b24c0bb56 100644
--- a/node_modules/nyc/lib/commands/instrument.js
+++ b/node_modules/nyc/lib/commands/instrument.js
@@ -31,11 +31,26 @@ exports.builder = function (yargs) {
type: 'boolean',
description: "should nyc's instrumenter produce source maps?"
})
+ .option('compact', {
+ default: true,
+ type: 'boolean',
+ description: 'should the output be compacted?'
+ })
+ .option('preserve-comments', {
+ default: true,
+ type: 'boolean',
+ description: 'should comments be preserved in the output?'
+ })
.option('instrument', {
default: true,
type: 'boolean',
description: 'should nyc handle instrumentation?'
})
+ .option('exit-on-error', {
+ default: false,
+ type: 'boolean',
+ description: 'should nyc exit when an instrumentation failure occurs?'
+ })
.example('$0 instrument ./lib ./output', 'instrument all .js files in ./lib with coverage and output in ./output')
}
@@ -50,11 +65,18 @@ exports.handler = function (argv) {
sourceMap: argv.sourceMap,
produceSourceMap: argv.produceSourceMap,
extension: argv.extension,
- require: argv.require
+ require: argv.require,
+ compact: argv.compact,
+ preserveComments: argv.preserveComments,
+ exitOnError: argv.exitOnError
})
nyc.instrumentAllFiles(argv.input, argv.output, function (err) {
- if (err) console.error(err.message)
- process.exit(1)
+ if (err) {
+ console.error(err.message)
+ process.exit(1)
+ } else {
+ process.exit(0)
+ }
})
}
diff --git a/node_modules/nyc/lib/commands/report.js b/node_modules/nyc/lib/commands/report.js
index 8289980b9..ff89da3f8 100644
--- a/node_modules/nyc/lib/commands/report.js
+++ b/node_modules/nyc/lib/commands/report.js
@@ -29,6 +29,12 @@ exports.builder = function (yargs) {
default: false,
type: 'boolean'
})
+ .option('skip-empty', {
+ describe: 'don\'t show empty files (no lines of code) in report',
+ default: false,
+ type: 'boolean',
+ global: false
+ })
.example('$0 report --reporter=lcov', 'output an HTML lcov report to ./coverage')
}