racoon-config
The Ano config (
.racoonrc
) reader and writer.
The config spec can be read here.
Install
$ npm install --save racoon-config
Usage
.load(overwrites)
Loads the racoon configuration from the configuration files.
Configuration is overwritten (after camelcase normalisation) with overwrites
argument.
This method overwrites following environment variables:
HTTP_PROXY
withproxy
configuration variableHTTPS_PROXY
withhttps-proxy
configuration variableNO_PROXY
withno-proxy
configuration variable
It also clears http_proxy
, https_proxy
, and no_proxy
environment variables.
To restore those variables you can use restore
method.
restore()
Restores environment variables overwritten by .load
method.
.toObject()
Returns a deep copy of the underlying configuration object. The returned configuration is normalised. The object keys will be camelCase.
#create(cwd)
Obtains a instance where cwd
is the current working directory (defaults to process.cwd
);
var config = ;// You can also specify a working directoryvar config2 = ;
#read(cwd, overrides)
Alias for:
var configObject = cwd;
License
Released under the MIT License.