nconf-transforms
Advanced tools
Comparing version 0.0.5 to 0.1.0
@@ -10,5 +10,6 @@ var config = require('nconf'); | ||
options.fileName = options.fileName || 'settings'; | ||
options.environment = options.environment || process.env['NODE_ENV']; | ||
var envConfig = options.dir + '/' + options.fileName + '.' + options.environment + '.json'; | ||
var envConfig = options.dir + '/' + options.fileName + '.' + process.env['NODE_ENV'] + '.json'; | ||
// if there is a settings.[NODE_ENV].json file (e.g settings.production.json file), load that too. | ||
@@ -15,0 +16,0 @@ if(glob.sync(envConfig).length > 0){ |
{ | ||
"name": "nconf-transforms", | ||
"version": "0.0.5", | ||
"version": "0.1.0", | ||
"description": "web.config like transforms for nconf", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/e-r-w/nconf-transforms", |
# nconf-transforms | ||
Similar to .NET web.config transforms, nconf-transforms allows you to load nconf configuration files based on convention. | ||
Reads the `NODE_ENV` environment variable to select what config file to transform. Currently only supports JSON format. | ||
By default reads the `NODE_ENV` environment variable to select what config file to transform. Currently only supports JSON format. | ||
@@ -54,3 +54,4 @@ ## Usage | ||
- reload: Boolean. Toggles reloading of configuration when the base config changes. | ||
- environment: String. The environment to transform to. Defaults to `process.env['NODE_ENV']` | ||
Returns the `nconf` object so you can chain loading other configuration types/files. |
2850
23
57