From f31d7a6e64336c4544c9ef5903c950f3687e4287 Mon Sep 17 00:00:00 2001 From: Martin Schut Date: Sun, 15 Oct 2017 20:48:46 +0200 Subject: [PATCH] feat: allow instrument-only to produce sourcemaps (#674) --- lib/commands/instrument.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/commands/instrument.js b/lib/commands/instrument.js index 6ff4a5222..cbf70480e 100644 --- a/lib/commands/instrument.js +++ b/lib/commands/instrument.js @@ -27,6 +27,11 @@ exports.builder = function (yargs) { type: 'boolean', description: 'should nyc detect and handle source maps?' }) + .option('produce-source-map', { + default: false, + type: 'boolean', + description: "should nyc's instrumenter produce source maps?" + }) .option('instrument', { default: true, type: 'boolean', @@ -44,6 +49,7 @@ exports.handler = function (argv) { var nyc = new NYC({ instrumenter: argv.instrumenter, sourceMap: argv.sourceMap, + produceSourceMap: argv.produceSourceMap, extension: argv.extension, require: argv.require })