Open Telokis opened 6 years ago
nconf.argv()
returns an instance of nconf
so you can chain calls together.
You can access the help via nconf.argv().stores.argv.showHelp()
; however, this is designed to be handled by a formatter, so the results may not be terribly useful to you.
Could it be possible for nconf to accept an optional usage
argument/option to be passed to yargs so that yargs can automatically handle --help
?
@Telokis sounds like that could be a good enhancement. Why not take a look at the source and submit a PR?
I am trying to call argv.showHelp in order to display which arguments are available to the user.
However, if I do
nconf.argv().showHelp();
it crashes.I tried reading the source code and I really expect this to work but it won't.