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() { program.version('0.1.0'); program.parse(process.argv); }
function runProgram() { program.parse(process.argv); if (!program.args.length) program.help(); }
start(process) { try { const runInInteractiveMode = this._isRunningInInteractiveMode(); const commandMetadataList = this._commandsMetadataService.getCommandsMetadata(); this._initializeCommands(commandMetadataList, runInInteractiveMode); // If there are no arguments, we print SuiteCloud version header if (!process.argv || process.argv.length <= 2) { NodeConsoleLogger.info(NodeTranslationService.getMessage(TITLE, COMPATIBLE_NS_VERSION)); } program .version(CLI_VERSION, '--version') .option(`${INTERACTIVE_ALIAS}, ${INTERACTIVE_OPTION}`, NodeTranslationService.getMessage(INTERACTIVE_OPTION_DESCRIPTION)) .on('command:*', args => { NodeConsoleLogger.error(NodeTranslationService.getMessage(ERRORS.COMMAND_DOES_NOT_EXIST, args[0])); }) .usage(NodeTranslationService.getMessage(USAGE)) .parse(process.argv); } catch (exception) { NodeConsoleLogger.error(unwrapExceptionMessage(exception)); } }
"Github username for which to list andculture repositories" .parse(process.argv);
cliArgs.parse(argv);
commander.parse(process.argv); const cmdName = process.argv[2];
program.parse(process.argv);
}); commander.parse(process.argv);
.option("-d, --delete", migration.description(modes.DELETE)) .option("-r, --run", migration.description(modes.RUN)) .parse(process.argv);
}); commander.parse(process.argv);
/** * configure input options */ function initialize() { program .version('1.5.8') .option('-i, --ignorecase', 'Ignore case distinctions') .option('-t, --extension <items>', 'Filter by custom types ex: ".app,.jar,.exe"') .option('-R, --rec', 'Recurse into subdirectories') .option('-x, --text [text]', 'Find text or /regex/ in files') .option('-w, --word [word]', 'Force PATTERN to match only whole words or /regex/ (file name)') .option('-v, --invert', 'Invert match: select non-matching lines') .option('--ignore-dir <items>', 'Ignore directories') .option('--ignore-file <items>', 'Ignore files') .option('--ignore-ext <items>', 'Ignore extensions') .option('--sort', 'Sort the found files'); //dynamic generate options Object.keys(typeList).forEach(function(type) { program.option('--' + type, 'filter ' + type + ' files'); }); program.parse(process.argv); checkParams(); }
"Skips the clean, build, and restore steps before running the dotnet test runner. This will speed up sequential runs if intentionally running on the same assemblies." .parse(process.argv);
); }) .parse(process.argv);
start(process) { try { const runInInteractiveMode = this._isRunningInInteractiveMode(); const commandMetadataList = this._commandsMetadataService.getCommandsMetadata(); this._initializeCommands(commandMetadataList, runInInteractiveMode); // If there are no arguments, we print SuiteCloud version header if (!process.argv || process.argv.length <= 2) { NodeConsoleLogger.info(NodeTranslationService.getMessage(TITLE, COMPATIBLE_NS_VERSION)); } program .version(CLI_VERSION, '--version') .option(`${INTERACTIVE_ALIAS}, ${INTERACTIVE_OPTION}`, NodeTranslationService.getMessage(INTERACTIVE_OPTION_DESCRIPTION)) .on('command:*', args => { NodeConsoleLogger.error(NodeTranslationService.getMessage(ERRORS.COMMAND_DOES_NOT_EXIST, args[0])); }) .usage(NodeTranslationService.getMessage(USAGE)) .parse(process.argv); } catch (exception) { NodeConsoleLogger.error(unwrapExceptionMessage(exception)); } }