1.0.0 • Published 9 years ago
kibbutz-rc v1.0.0
Kibbutz RC Plugin
RC configuration provider for Kibbutz.
The kibbutz-rc module is a kibbutz provider for loading configuration fragments from rc.
Usage
Add kibbutz-rc as a dependency in package.json:
$ npm install kibbutz-rc -SCreate an instance of RcProvider and supply it to the load() method of a Kibbutz instance:
const Kibbutz = require('kibbutz');
const RcProvider = require('kibbutz-rc');
const config = new Kibbutz({
value: {
foo: 'bar'
}
});
const rcProvider = new RcProvider({
appName: 'myapp'
});
config.load([ rcProvider ], function(err, config) {
// do something beautiful with your configuration
});Constructor Options
The kibbutz-rc plugin provides options to configure the underlying rc module. Constructor options should be an object, and can contain the following keys:
appName: (required) theappNameto pass torc.defaults: (optional) an object that contains the default values to pass torc.argv: (optional) the componentrcshould use to parse command-like arguments.parser: (optional) the parserrcshould to interpret configuration data.
1.0.0
9 years ago