program.on('--help', () => { console.log(` Get started: $ postgraphile $ postgraphile -c postgres://localhost/my_db $ postgraphile --connection postgres://user:pass@localhost/my_db --schema my_schema --watch --dynamic-json `); process.exit(0); });
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)
program.on("--help", () => { console.log(""); console.log(" Examples:".blue); console.log(""); console.log(" $ xmysql -u username -p password -d databaseSchema".blue); console.log(""); });
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)); } }
program .on('command:*', function() { console.error(('Invalid command ' + program.args[0]).red); program.outputHelp(); });
program.on("--help", function () { const envInfo = getEnvVarInfo(); console.log(" Available Setting ENV Variables:"); console.log(""); envInfo.forEach((item) => { console.log(` ${item.name} : ${item.description}`); }); console.log(""); });
// Failsafe that shows the help dialogue if the command is not recognized (`$ react xyz`) program.on('*', function(opt) { program.help(); });
program.on('--help', function() { console.log('\r\nExamples:') console.log( ' ' + grey('$') + ' fb start -p -t start:dev,server:dev ' + '- launch commands "start:dev" and "server:dev" (-t start:dev,server:dev) from package.json (-p)\r\n' + ' ' + grey('$') + ' fb start ' + '- launch all commands from Procfile and output logs to this command line\r\n' + ' ' + grey('$') + ' fb web ' + '- launch web GUI which have contained all possible commands from package.json etc.\r\n' + ' ' + grey('$') + ' fb web -w -u yarn ' + '- launch web GUI without opening new tab in the browser (-w) and will use another package manager (-u yarn) for launching commands from package.json\r\n' + ' ' + grey('$') + ' fb web -i ' + '- launch web GUI which will launch tasks without yarn or npm (using absolute paths: webpack -> node_modules/.bin/webpack) (-i)' ) })
program.on('--help', function(){ console.log("Usage: " + pjson.name + " [OPTION]\n"); });
program.on('--help', () => { console.log(' Examples:'); console.log(''); console.log(' $ createDOC --help'); console.log(' $ createDOC -h'); console.log(' $ createDOC show'); console.log(''); });
// add some useful info on help program.on('--help', () => { console.log() console.log(` Run ${chalk.cyan(`teadocs <command> --help`)} for detailed usage of given command.`) console.log() })
// // React when the user needs help // program.on('--help', function() { // // Just add an empty line at the end of the help to make the text more // clear to the user // console.log(""); });
// // React when the user needs help. // program.on('--help', function() { // // Just add an empty line at the end of the help to make the text more // clear to the user. // console.log(""); });
// source and destination is all backwoards // // React when the user needs help // program.on('--help', function() { // // Just add an empty line at the end of the help to make the text more // clear to the user // console.log(""); });
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)); } }