lib/get_files.js
function getFiles(env)
{
  var files       = []
    , environment = env['NODE_ENV'] || this.defaults.environment
    , appInstance = env['NODE_APP_INSTANCE']
    ;

  // generate config files variations
  this.files.forEach(function(baseName)
  {
    // check for variables
    // keep baseName if no variables found
    baseName = parseTokens(baseName, env) || baseName;

    // add base name with available suffixes
    addWithSuffixes.call(this, files, baseName, appInstance);
    addWithSuffixes.call(this, files, baseName, environment, appInstance);
  }.bind(this));

  return files;
}
function getFiles(env)
{
  var files       = []
    , environment = env['NODE_ENV'] || this.defaults.environment
    , appInstance = env['NODE_APP_INSTANCE']
    ;

  // generate config files variations
  this.files.forEach(function(baseName)
  {
    // check for variables
    // keep baseName if no variables found
    baseName = parseTokens(baseName, env) || baseName;

    // add base name with available suffixes
    addWithSuffixes.call(this, files, baseName, appInstance);
    addWithSuffixes.call(this, files, baseName, environment, appInstance);
  }.bind(this));

  return files;
}
function getFiles ( env ) { var files = [ ] , environment = env [ 'NODE_ENV' ] || this . defaults . environment , appInstance = env [ 'NODE_APP_INSTANCE' ] ; // generate config files variations this . files . forEach ( function ( baseName ) { // check for variables // keep baseName if no variables found baseName = parseTokens ( baseName , env ) || baseName ; // add base name with available suffixes addWithSuffixes . call ( this , files , baseName , appInstance ) ; addWithSuffixes . call ( this , files , baseName , environment , appInstance ) ; } . bind ( this ) ) ; return files ; }
Creates list of files to load configuration from
derived from the passed environment-like object

@param   {object} env - environment-like object (e.g. `process.env`)
@returns {array} - ordered list of config files to load
Creates list of files to load configuration from derived from the passed environment - like object