Closed mnpenner closed 2 weeks ago
Sorry, I'm dumb. Should have been
async function main(): Promise<number | void> {
const optionsList = [
{name: 'help', alias: 'h', type: Boolean},
]
const options = commandLineArgs(optionsList)
if(options.help) {
console.log(commandLineUsage([
{
header: 'Options',
optionList: optionsList,
}
]))
return 0
}
return run(options)
}
command-line-args
says we can use this lib to show usage.But the syntaxes seem completely different?
For example, if I try:
It renders like this:
Do I really have to define my options twice? Once for each lib using slightly different options?