program .version(version, '-v, --version', 'print version') .usage('[options] <files>') .option('-l, --list-browsers', 'list (effective or --all) browsers') .option('-a, --all', 'test or list all available browsers') .option('-c, --concurrency <n>', 'number of browsers to test concurrently, default 5') .option('-r, --retries <retries>', 'number of retries when running a browser, default 6') .option('-t, --timeout <timeout>', 'how long to wait for test results, default 5m') .option('--coverage', 'enable code coverage analysis') .option('--live', 'keep browsers open to allow repeated test runs') .option('-p, --preset <preset>', 'select a configuration preset') .option('-s, --server <script>', 'path to script that runs a support server') .option('--loopback <hostname>', 'custom hostname that equals or resolves to 127.0.0.1') .option('--verbose', 'enable airtap debug output') .option('--silly', 'enable all debug output') // Can we hide these in help? .option('--local', 'n/a') .option('--open', 'n/a') .option('--electron', 'n/a') .on('--help', function () { console.log() console.log(read('examples.txt')) }) .parse(process.argv)
execute() { const file = editJsonFile('package.json'); const version = file.get('version'); program.version(version); }
program .version(packageInfo.version) .arguments('<swaggerFile>') .action((swaggerFilePath) => { swaggerFile = path.resolve(swaggerFilePath); }) .option('-b, --handlebars <helperFilePath>', 'path to external handlebars helpers file (defaults to empty)', parseOutput) .option('-o, --output <outputDir>', 'directory where to put the generated files (defaults to current directory)', parseOutput, process.cwd()) .option('-t, --templates <templateDir>', 'directory where templates are located (defaults to internal nodejs templates)') .parse(process.argv);
program .version(ver) .on('--help', function() { console.log(''); console.log(` BitBar CLI Tool v${ver} by Kodie Grantham [www.kodieg.com]`); console.log(' https://github.com/kodie/bitbar-cli'); console.log(''); }) .parse(process.argv);
program .version(thancPkg.version) .usage('[options] <project_path>') .option('--me', 'thank thanc package and all of its dependencies') .option('-u, --username <username>', 'your Github username') .option('-p, --password <password>', 'your Github password') .option('-t, --token <password>', 'your Github token') .option('-q, --quite', 'Show only the progress bar instead of the repos list') .arguments('<path>') .action(path => projectPath = path ? path : projectPath) .parse(process.argv)
program .version(version) .usage('[options] [filters...]') .option('-d, --debug', 'Logs debug information in the console') .action((filters, options) => { cmdOptions = options; if (options.debug) { debugCore.enable(DEBUG_NAMESPACE); } choosenFilters = choosenFilters.concat(filters); }) .parse(process.argv);
program .version(version) .description(`Node.js Version Manager`) .on('--help', () => { console.log(` Submit an issue: https://github.com/pd4d10/nn/issues/new`) })
function main() { cli.version(version).option('-s, --socks [socks]', 'specify your socks proxy host, default: 127.0.0.1:1080').option('-p, --port [port]', 'specify the listening port of http proxy server, default: 8080').option('-l, --host [host]', 'specify the listening host of http proxy server, default: 127.0.0.1').option('-c, --config [config]', 'read configs from file in json format').option('--level [level]', 'log level, vals: info, error').parse(process.argv); var options = getOptionsArgs(cli); var fileConfig = null; if (options.config) { fileConfig = getFileConfig(options.config); } Object.assign(options, fileConfig); createServer(options); }
program .version(version) .usage('task [options]') .arguments('<task>') .option('-s, --stages <stages>', 'Specify stages you want to run', function(value) { return value.split(','); }) .action(function (task) { taskName = task; }) .parse(process.argv);
cmd .version(appInfo.version) .option('-i, --index <n>', 'ascii art index, default is random', -1, parseInt) .option('-t, --type <value>', '[quotes|jokes|tang|song]', 'quotes', /^(quotes|jokes|tang|song)$/i) .on('--help', function(){ console.log('\t' + appInfo.repository.url); }).parse(process.argv);