Warn user if missing a config file

Report a warning when the main json file is missing and there is a
local or {env} file present
This commit is contained in:
Amir Jafarian 2015-11-13 10:32:08 -05:00
parent 24fbfbebf1
commit 3f55acf9d5
1 changed files with 4 additions and 0 deletions

View File

@ -89,6 +89,10 @@ function loadNamed(rootDir, env, name, mergeFn) {
*/
function findConfigFiles(appRootDir, env, name) {
var master = ifExists(name + '.json');
if (!master && (ifExistsWithAnyExt(name + '.local') ||
ifExistsWithAnyExt(name + '.' + env))) {
console.warn('WARNING: Main config file "' + name + '.json" is missing');
}
if (!master) return [];
var candidates = [