diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-09-20 02:56:13 +0200 |
commit | bbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch) | |
tree | c58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/nyc/bin/nyc.js | |
parent | 003fb34971cf63466184351b4db5f7c67df4f444 (diff) |
update packages
Diffstat (limited to 'node_modules/nyc/bin/nyc.js')
-rwxr-xr-x | node_modules/nyc/bin/nyc.js | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/node_modules/nyc/bin/nyc.js b/node_modules/nyc/bin/nyc.js index 8918a3503..d7c070a81 100755 --- a/node_modules/nyc/bin/nyc.js +++ b/node_modules/nyc/bin/nyc.js @@ -1,32 +1,32 @@ #!/usr/bin/env node -var configUtil = require('../lib/config-util') -var foreground = require('foreground-child') +const configUtil = require('../lib/config-util') +const foreground = require('foreground-child') var NYC try { NYC = require('../index.covered.js') } catch (e) { NYC = require('../index.js') } -var processArgs = require('../lib/process-args') +const processArgs = require('../lib/process-args') -var sw = require('spawn-wrap') -var wrapper = require.resolve('./wrap.js') +const sw = require('spawn-wrap') +const wrapper = require.resolve('./wrap.js') // parse configuration and command-line arguments; // we keep these values in a few different forms, // used in the various execution contexts of nyc: // reporting, instrumenting subprocesses, etc. -var yargs = configUtil.addCommandsAndHelp(configUtil.buildYargs()) -var instrumenterArgs = processArgs.hideInstrumenteeArgs() -var argv = yargs.parse(instrumenterArgs) +const yargs = configUtil.buildYargs() +const instrumenterArgs = processArgs.hideInstrumenteeArgs() +const config = configUtil.loadConfig(yargs.parse(instrumenterArgs)) +configUtil.addCommandsAndHelp(yargs) +const argv = yargs.config(config).parse(instrumenterArgs) -if (argv._[0] === 'report') { - // look in lib/commands/report.js for logic. -} else if (argv._[0] === 'check-coverage') { - // look in lib/commands/check-coverage.js for logic. -} else if (argv._[0] === 'instrument') { - // look in lib/commands/instrument.js for logic. +if ([ + 'check-coverage', 'report', 'instrument', 'merge' +].indexOf(argv._[0]) !== -1) { + // look in lib/commands for logic. } else if (argv._.length) { // if instrument is set to false, // enable a noop instrumenter. |