cli .command('listen') .alias('l') .description('start the server and listen for requests') .option('-H, --host <host>', 'host') .option('-p, --port <port>', 'port number', Polly.Defaults.port) .option( '-n, --api-namespace <namespace>', 'api namespace', Polly.Defaults.apiNamespace ) .option( '-d, --recordings-dir <path>', 'recordings directory', Polly.Defaults.recordingsDir ) .option( '-s, --recording-size-limit <limit>', 'recording size limit', Polly.Defaults.recordingSizeLimit ) .option('-q, --quiet', 'disable the logging') .action(function(options) { new Polly.Server(options).listen(); });
program .command('mute') .alias('m') .description('Mute player') .action(() => { spotifyClient.mute().then(() => { spotifyClient.getVolume().then((result) => { printer.printMute(result); }); }); });
commander .command('plugin [plugin-name]') .alias('p') .option('-y','Ignore questions.') .description('Generate new plugin.') .action(async()=>{ await cogear.emit('generators.init','plugin'); cogear.emit('generators.plugin'); });
commander .command('getContact') .alias('g') .description('Get Contact') .action(function () { console.log(chalk_1.default.yellow('=========*** Contact Management System ***==========')); inquirer.prompt(questions_1.getIdQuestions).then(function (answers) { return actions.getContact(answers.id); }); });
program .command('merge-requests') .alias('mrs') .legacy('open-merge-requests') .option('-v, --verbose [optional]', 'Detailed logging emitted on console for debug purpose') .option('-r, --remote [optional]', 'If provided this will be used as remote') .option('-a, --assignee [optional]', 'If provided, merge requests assigned to only this user will be shown') .option('-s, --state [optional]', 'If provide merge requests with state provided will be shown') .description('Opens merge requests page for the repo') .action(function (options) { openMergeRequests(options); });
program .command('prettier <path>') .alias('p') .description('Prettier the code under the specified path.') .action(param => { const options = getPrettifyOptions() exec(`npx prettier ${options} --write ${getPrettify(param)}`, (error, stdout, stderr) => { console.log(stdout) if (error) return print(`error`, `✘ Opps, Something Error: ${error}`) print(`success`, '✓ Okay, Has successfully prettier your code.') }) })
jen .command(COMMAND.status) .alias('s') .description('Print branch build status') .action(() => { run(COMMAND.status); });
commander .command('updateContact') .alias('u') .description('Update Contact') .action(function () { console.log(chalk_1.default.yellow('=========*** Contact Management System ***==========')); inquirer.prompt(questions_1.updateContactQuestions).then(function (answers) { return actions.updateContact(answers); }); });
program .command('unmute') .alias('u') .description('Unmute player') .action(() => { spotifyClient.unmute().then(() => { spotifyClient.getVolume().then((result) => { printer.printUnmute(result); }); }); });
program .command('share [type]') .alias('sh') .description('Display share <uri|url> and copy value to clipboard') .action((type) => { spotifyClient.share(type); });
program .command('token') .alias('tk') .description('Change Client Spotify tokens') .action(() => { setTokens(); });
program .command("run <script>") // sub-command name .alias("r") // alternative sub-command .description("Run an already loaded script, or a quick run without loading a script by typing the path to the script") // command description // function to execute when command is uses .action(function(script) { run(script); });
cli .command('listen') .alias('l') .description('start the server and listen for requests') .option('-H, --host <host>', 'host') .option('-p, --port <port>', 'port number', Polly.Defaults.port) .option( '-n, --api-namespace <namespace>', 'api namespace', Polly.Defaults.apiNamespace ) .option( '-d, --recordings-dir <path>', 'recordings directory', Polly.Defaults.recordingsDir ) .option( '-s, --recording-size-limit <limit>', 'recording size limit', Polly.Defaults.recordingSizeLimit ) .option('-q, --quiet', 'disable the logging') .action(function(options) { new Polly.Server(options).listen(); });
commander .command('theme [theme-name]') .alias('t') .option('-y','Ignore questions.') .description('Generate new theme.') .action(async()=>{ await cogear.emit('generators.init','theme'); cogear.emit('generators.theme'); });
commander .command('new [site-name]') .alias('init') .option('-y','Ignore questions.') .description('Generate new site.') .action(async()=>{ await cogear.emit('generators.init','site'); cogear.emit('generators.site'); });