Skip to content

Commit

Permalink
fix(*): export runner default options.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ledin committed Jul 29, 2019
1 parent 3979a6f commit c76c8b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ function tryOptions(customPath, optionsFile, throwError = false) {

function loadOptions(argv) {
const {options: argvOptions, optionsPath, ...rest} = parseArgs(argv);
console.error(optionsPath);
return {
options: require('deepmerge').all([
{
Expand Down
14 changes: 7 additions & 7 deletions runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,16 @@ function resolveAndRunCommand(command, args, config, options) {
}

module.exports = (command, configName, options) => {
options = merge({
command: {
property: module.exports.commandProperty,
enabled: true
}
}, options);
options = merge(module.exports.defaultOptions, options);
let args;
({args, command, options} = resolvePlugin(command, options));
return resolveAndRunCommand(command, args, require('.')(configName, options), options);
};

module.exports.commandProperty = 'command';
module.exports.defaultOptions = {
command: {
property: 'command',
enabled: true
}
};

0 comments on commit c76c8b9

Please sign in to comment.