Skip to content

Commit

Permalink
support multi input
Browse files Browse the repository at this point in the history
  • Loading branch information
amanoooo committed Aug 22, 2020
1 parent 17ace83 commit 6b4d5c5
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,21 @@ const commander = require('commander'); // include commander in git clone of com
const program = new commander.Command();

program
.option('-v, --verbose', 'erbose debug output.', false)
.option('-i, --input <string[]>', 'input dir', [])
.option('-i, --input <string[]>', 'input dir', collect, [])
.option('-o, --output <string>', 'enable verbose', 'doc')
.option('-c, --config <config>', 'Path to config file or to directory containing config file (apidoc.json or apidoc.config.js).', '')

.option('--definitions', 'Include definitions file rather than copying definitions.', false)

.option('-p, --private', 'Include private APIs in output.', false)

.option('-v, --verbose', 'Verbose debug output.', false)

.option('-d, --debug', 'Show debug messages.', false)
.option('-c, --color', 'Show color', true)

.option('--color', 'Turn off log color.', true)

// .option('--parse', 'Parse only the files and return the data, no file creation.', false)
.option('-p, --parsee', 'Parse only the files and return the data, no file creation', false)
.option('-s, --simulate', 'Execute but not write any file.', false)

Expand All @@ -33,6 +43,18 @@ const options = {
}
console.log('options', options);


/**
* Collect options into an array
* @param {String} value
* @param {String[]} acc
* @returns {String[]}
*/
function collect(value, acc) {
acc.push(value);
return acc;
}

const { main } = require('./lib')


Expand Down

0 comments on commit 6b4d5c5

Please sign in to comment.