swico 0.8.4-beta4 → 0.8.4-beta5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/utils/config.js +7 -7
package/package.json
CHANGED
package/src/utils/config.js
CHANGED
|
@@ -134,20 +134,20 @@ var getProjectConfig = function (env) { return __awaiter(void 0, void 0, void 0,
|
|
|
134
134
|
if (configFields.length > 0 && unSupportedField) {
|
|
135
135
|
msgText = "The Swico configuration file '".concat(chalk_1.default.blue(configFileName), "' does not support the field '").concat(chalk_1.default.red(unSupportedField), "' ");
|
|
136
136
|
tools_1.toast.error(msgText);
|
|
137
|
-
process.exit();
|
|
137
|
+
process.exit(1);
|
|
138
138
|
}
|
|
139
139
|
if (key === 'base' && !['vue', 'react'].includes(configObj['template'])) {
|
|
140
|
-
tools_1.toast.error("The field '".concat(chalk_1.default.blue('template'), "' does not support the value '").concat(chalk_1.default.red(configObj['template']), "',the value
|
|
141
|
-
process.exit();
|
|
140
|
+
tools_1.toast.error("The field '".concat(chalk_1.default.blue('template'), "' does not support the value '").concat(chalk_1.default.red(configObj['template']), "',the value should be 'vue' or 'react' "), { title: "Swico config => ".concat(configFileName) });
|
|
141
|
+
process.exit(1);
|
|
142
142
|
}
|
|
143
143
|
if (key === 'base' &&
|
|
144
144
|
!['npm', 'pnpm'].includes((_b = configObj['npmType']) !== null && _b !== void 0 ? _b : exports.initConfig.npmType)) {
|
|
145
|
-
tools_1.toast.error("The field '".concat(chalk_1.default.blue('npmType'), "' does not support the value '").concat(chalk_1.default.red(configObj['npmType']), "',the value
|
|
146
|
-
process.exit();
|
|
145
|
+
tools_1.toast.error("The field '".concat(chalk_1.default.blue('npmType'), "' does not support the value '").concat(chalk_1.default.red(configObj['npmType']), "',the value should be 'npm' or 'pnpm' "), { title: "Swico config => ".concat(configFileName) });
|
|
146
|
+
process.exit(1);
|
|
147
147
|
}
|
|
148
148
|
if (!['hash', 'browser'].includes((_d = (_c = configObj['router']) === null || _c === void 0 ? void 0 : _c.type) !== null && _d !== void 0 ? _d : exports.initConfig.router.type)) {
|
|
149
|
-
tools_1.toast.error("The field '".concat(chalk_1.default.blue('router.type'), "' does not support the value '").concat(chalk_1.default.red(configObj['router'].type), "',the value
|
|
150
|
-
process.exit();
|
|
149
|
+
tools_1.toast.error("The field '".concat(chalk_1.default.blue('router.type'), "' does not support the value '").concat(chalk_1.default.red(configObj['router'].type), "',the value should be 'browser' or 'hash' "), { title: "Swico config => ".concat(configFileName) });
|
|
150
|
+
process.exit(1);
|
|
151
151
|
}
|
|
152
152
|
_f = customConfig;
|
|
153
153
|
_g = key;
|