diff --git a/README.md b/README.md index 7f4b85e..e06798f 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,10 @@ Given your application name (`appname`), rc will look in all the obvious places * `$HOME/.config/${appname}/config` * `/etc/${appname}rc` * `/etc/${appname}/config` + * `/etc/${appname}.config` + * `/usr/local/etc/${appname}rc` + * `/usr/local/etc/${appname}/config` + * `/usr/local/etc/${appname}.config` * the defaults object you passed in. All configuration sources that were found will be flattened into one object, diff --git a/index.js b/index.js index 65eb47a..c392847 100755 --- a/index.js +++ b/index.js @@ -2,6 +2,7 @@ var cc = require('./lib/utils') var join = require('path').join var deepExtend = require('deep-extend') var etc = '/etc' +var localEtc = '/usr/local/etc' var win = process.platform === "win32" var home = win ? process.env.USERPROFILE @@ -35,7 +36,11 @@ module.exports = function (name, defaults, argv, parse) { // which files do we look at? if (!win) [join(etc, name, 'config'), - join(etc, name + 'rc')].forEach(addConfigFile) + join(etc, name + 'rc'), + join(etc, name + '.conf'), + join(localEtc, name, 'config'), + join(localEtc, name + 'rc'), + join(localEtc, name + '.conf')].forEach(addConfigFile) if (home) [join(home, '.config', name, 'config'), join(home, '.config', name),