修复任务跳转脚本参数,task运行脚本支持更多参数

This commit is contained in:
whyour
2021-12-21 00:23:20 +08:00
parent a9be3e6376
commit 931f02ef8e
4 changed files with 49 additions and 9 deletions
+13
View File
@@ -0,0 +1,13 @@
import { CommandModule } from 'yargs';
export const updateCommand: CommandModule = {
command: 'update',
describe: 'Update and restart qinglong',
builder: (yargs) => {
return yargs.option('repositority', {
type: 'string',
alias: 'r',
describe: `Specify the release warehouse address of the package`,
});
},
handler: async (argv) => {},
};
+11 -1
View File
@@ -1,3 +1,13 @@
import * as yargs from 'yargs';
import { green, red } from 'chalk';
import { updateCommand } from './commands/update';
yargs.help('h').alias('h', 'help').help().argv;
yargs
.usage('Usage: ql [command] <options>')
.command(updateCommand)
.fail((err) => {
console.error(`${red(err)}`);
})
.alias('h', 'help')
.showHelp()
.recommendCommands().argv;