Skip to content

Conversation

@mhamann
Copy link
Collaborator

@mhamann mhamann commented Apr 15, 2022

Enables the nconf argv loader to receive a second argument of options (e.g., parseValues, transform, etc) when passing in a custom or pre-configured yargs instance.

Example:

let yargs = require('yargs')
    .version('1.2.3')
    .help(false)
    .usage('My usage definition')
    .strict()
    .options({
      "x": {
        alias: 'example',
        describe: 'Example description for usage generation',
        demand: true,
        default: 'some-value'
      }
    });

  nconf.argv(yargs, {
    parseValues: true
  });

Resolves #395.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants