diff options
Diffstat (limited to 'node_modules/nyc/lib/commands')
-rw-r--r-- | node_modules/nyc/lib/commands/instrument.js | 28 | ||||
-rw-r--r-- | node_modules/nyc/lib/commands/report.js | 6 |
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') } |