2022-04-22 12:22:17 +00:00
|
|
|
import yargs from 'yargs/yargs';
|
|
|
|
import { hideBin } from 'yargs/helpers';
|
|
|
|
|
2024-01-29 05:21:34 +00:00
|
|
|
// eslint-disable-next-line no-unused-expressions
|
2022-04-22 12:22:17 +00:00
|
|
|
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;
|