2022-04-22 12:22:17 +00:00
|
|
|
import yargs from 'yargs/yargs';
|
|
|
|
import { hideBin } from 'yargs/helpers';
|
|
|
|
|
|
|
|
yargs(hideBin(process.argv))
|
2022-04-25 06:27:40 +00:00
|
|
|
.options({
|
|
|
|
verbose: {
|
|
|
|
description: 'Verbose output',
|
|
|
|
demand: false,
|
|
|
|
default: false,
|
|
|
|
type: 'boolean',
|
|
|
|
alias: 'v'
|
|
|
|
},
|
|
|
|
config: {
|
|
|
|
alias: 'c',
|
|
|
|
default: 'config.yml',
|
|
|
|
describe: 'Config file path.',
|
|
|
|
type: 'string'
|
2023-03-27 12:05:47 +00:00
|
|
|
},
|
|
|
|
output: {
|
|
|
|
alias: 'o',
|
|
|
|
describe: 'Gives output in json format when specified.',
|
|
|
|
type: 'string'
|
2022-04-25 06:27:40 +00:00
|
|
|
}
|
|
|
|
})
|
2022-04-22 12:22:17 +00:00
|
|
|
.commandDir('cmds')
|
|
|
|
.demandCommand()
|
|
|
|
.help()
|
|
|
|
.argv;
|