Merge pull request #54 from eethann/master

Add docs for optimist options hash
This commit is contained in:
Joshua Holbrook 2012-08-06 23:24:22 -07:00
commit ec9a13e901

View file

@ -157,13 +157,20 @@ A simple in-memory storage engine that stores a nested JSON representation of th
```
### 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
//
// 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