kibbutz-rc

1.0.0 • Public • Published

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 -S

Create 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) the appName to pass to rc.
  • defaults: (optional) an object that contains the default values to pass to rc.
  • argv: (optional) the component rc should use to parse command-like arguments.
  • parser: (optional) the parser rc should to interpret configuration data.

Dependencies (2)

Dev Dependencies (3)

Package Sidebar

Install

npm i kibbutz-rc

Weekly Downloads

1

Version

1.0.0

License

none

Last publish

Collaborators

  • dsfields