diff options
-rw-r--r-- | scripts/package.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/package.js b/scripts/package.js index 26580d5..2675ffb 100644 --- a/scripts/package.js +++ b/scripts/package.js | |||
@@ -117,8 +117,12 @@ const compress = (src, dest) => new Promise((resolve, reject) => { | |||
117 | 117 | ||
118 | const topLevelKeys = Object.keys(config); | 118 | const topLevelKeys = Object.keys(config); |
119 | topLevelKeys.forEach(key => { | 119 | topLevelKeys.forEach(key => { |
120 | if (typeof(config[key]) === 'string' && config[key] === '') { | 120 | if (typeof(config[key]) === 'string') { |
121 | configErrors.push(`The recipe's package.json contains empty value for key: ${key}`); | 121 | if (config[key] === '') { |
122 | configErrors.push(`The recipe's package.json contains empty value for key: ${key}`); | ||
123 | } | ||
124 | } else if ((key === 'config' || key === 'aliases') && typeof(config[key]) !== 'object') { | ||
125 | configErrors.push(`The recipe's package.json contains unexpected value for key: ${key}`); | ||
122 | } | 126 | } |
123 | }); | 127 | }); |
124 | 128 | ||
@@ -135,6 +139,10 @@ const compress = (src, dest) => new Promise((resolve, reject) => { | |||
135 | configErrors.push(`The recipe's package.json contains the following keys that are not recognized: ${unrecognizedConfigKeys}`); | 139 | configErrors.push(`The recipe's package.json contains the following keys that are not recognized: ${unrecognizedConfigKeys}`); |
136 | } | 140 | } |
137 | 141 | ||
142 | // if (config.config.hasCustomUrl !== undefined && config.config.hasHostedOption !== undefined) { | ||
143 | // configErrors.push("The recipe's package.json contains both 'hasCustomUrl' and 'hasHostedOption'. Please remove 'hasCustomUrl' since it is overridden by 'hasHostedOption'"); | ||
144 | // } | ||
145 | |||
138 | configKeys.forEach(key => { | 146 | configKeys.forEach(key => { |
139 | if (typeof(config.config[key]) === 'string' && config.config[key] === '') { | 147 | if (typeof(config.config[key]) === 'string' && config.config[key] === '') { |
140 | configErrors.push(`The recipe's package.json contains empty value for key: ${key}`); | 148 | configErrors.push(`The recipe's package.json contains empty value for key: ${key}`); |