Allow your users to overwrite default config.
Install
$ npm install --save config-overwrite
Usage
The function requires two parameters, both can be an object or a path as a string. The first parameter is the global config which you provide, the second will be the local overwrite. The local file only needs to contain the keys to be overwritten.
If a version key is provided in both config files, the function will check if they are the same. If the versions do not match, the process wil be exited.
Example:
var configoverwrite = ;var config = ; var configuration = ;
config.json:
config.local.json:
result:
Changelog
v1.1.0 - 2017-12-15
- function can be called by configoverwrite() instead of configoverwrite.generate()
- If a version key is provided in your config, the
v1.0.0 - 2017-11-24
- Initial release