Merge pull request #54 from eethann/master
Add docs for optimist options hash
This commit is contained in:
commit
ec9a13e901
1 changed files with 26 additions and 19 deletions
11
README.md
11
README.md
|
@ -157,13 +157,20 @@ A simple in-memory storage engine that stores a nested JSON representation of th
|
||||||
```
|
```
|
||||||
|
|
||||||
### Argv
|
### Argv
|
||||||
Responsible for loading the values parsed from `process.argv` by `optimist` into the configuration hierarchy.
|
Responsible for loading the values parsed from `process.argv` by `optimist` into the configuration hierarchy. See the [optimist option docs](https://github.com/substack/node-optimist/#optionskey-opt) for more on the option format.
|
||||||
|
|
||||||
``` js
|
``` js
|
||||||
//
|
//
|
||||||
// Can optionally also be an object literal to pass to `optimist`.
|
// Can optionally also be an object literal to pass to `optimist`.
|
||||||
//
|
//
|
||||||
nconf.argv(options);
|
nconf.argv({
|
||||||
|
"x": {
|
||||||
|
alias: 'example',
|
||||||
|
describe: 'Example description for usage generation',
|
||||||
|
demand: true,
|
||||||
|
default: 'some-value'
|
||||||
|
}
|
||||||
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
### Env
|
### Env
|
||||||
|
|
Loading…
Reference in a new issue