Merge pull request #162 from Amir-61/missingConfigWarning

Warn about missing main json config file
This commit is contained in:
Miroslav Bajtoš 2015-11-24 14:07:53 +01:00
commit c17efda0eb
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) { function findConfigFiles(appRootDir, env, name) {
var master = ifExists(name + '.json'); 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 []; if (!master) return [];
var candidates = [ var candidates = [