3.0.0 • Published 8 years ago
cliche-config v3.0.0
JSON/YAML configs loader.
const Config = require('cliche-config');
const config = new Config();
const config2 = new Config();
config.add({ property: 'value' });
config.add('config.js');
config.add('config.json');
config.add('config.yaml');
config.add('another_config');
config.add(config2);
config.get('option');
config.get('nested.option');
Installation
$ npm install --save cliche-config
Features
- JS module as configs (module must return a plain object)
- JSON configs support
- YAML configs support (
js-yaml
is used to load) - Config override - latter loaded file will have precedence upon key search
Notes
When add source as a filename without extension we'll try to load first .js
, then .json
and then .yaml
(in that order).
Examples
- TODO