Comparing version 1.0.3 to 1.0.4
18
index.js
@@ -11,3 +11,3 @@ | ||
const keywords = ['root', 'require', 'include', 'common', 'prod', 'phase']; | ||
const keywords = ['root', 'require', 'phase', 'warnings']; | ||
@@ -17,3 +17,4 @@ // Configuration object | ||
root: ROOT_DIR, | ||
require: module => require(path.join(ROOT_DIR, module)) | ||
require: module => require(path.join(ROOT_DIR, module)), | ||
warnings: [] | ||
}; | ||
@@ -26,4 +27,13 @@ | ||
const phaseResolver = new PhaseResolver(main.json.phase); | ||
main.resolve(phaseResolver.resolve(), modules); | ||
_.merge(_conf, main.resolved); | ||
_conf.phase = phaseResolver.resolve(); | ||
main.resolve(_conf.phase, modules); | ||
let conf = main.resolved; | ||
_.forEach(keywords, keyword => { | ||
if(_.has(conf, keyword)) { | ||
_.unset(conf, keyword); | ||
_conf.warnings.push(`"${keyword}" is a reserved keyword and should not be used`); | ||
} | ||
}); | ||
_.merge(_conf, conf); | ||
} | ||
@@ -30,0 +40,0 @@ |
{ | ||
"name": "izi-config", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Configuration handler for izi-app", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11278
322