gitlike-config
A Node module for git-like local/global configuration file management in CLI programs. Uses JSON files to store configuration data in a local directory (the current working directory or a parent of it) and in a global directory (e.g. a folder in AppData
in Windows or ~/.config
in Linux). The objects in these JSON files can have nested properties; the objects are merged deeply. Local values override global ones, and both global and local values override the default ones specified programmatically.
Installation
$ npm install --save gitlike-config
Usage
var Config = ; var conf = name: 'yourAppName' defaults: // optional yourDefaults: 'go here' properties: can: be: 'nested' ; console;// --> 'go here' console;// --> 'nested' conf;console;// --> 'awesome' conf;console;// --> 'awesome' (because the local setting overrides the global one)