swico 0.8.4-beta5 → 0.8.4-beta6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swico",
3
- "version": "0.8.4-beta5",
3
+ "version": "0.8.4-beta6",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -93,7 +93,7 @@ var getProjectConfig = function (env) { return __awaiter(void 0, void 0, void 0,
93
93
  };
94
94
  customConfig = {};
95
95
  _loop_1 = function (key) {
96
- var curConfigFilePath, exists, configObj, configFields, supportedFieldList_1, configFileName, unSupportedField, msgText, _f, _g;
96
+ var curConfigFilePath, exists, configObj, configFields, supportedFieldList_1, configFileName, toastTitle, unSupportedField, msgText, _f, _g;
97
97
  return __generator(this, function (_h) {
98
98
  switch (_h.label) {
99
99
  case 0:
@@ -130,6 +130,7 @@ var getProjectConfig = function (env) { return __awaiter(void 0, void 0, void 0,
130
130
  supportedFieldList_1 = ['plugins', 'console', 'copy', 'devtool', 'router'];
131
131
  configFileName = 'swico.prod.ts';
132
132
  }
133
+ toastTitle = "Swico config => ".concat(chalk_1.default.hex(tools_1.colorConfig.theme)(configFileName));
133
134
  unSupportedField = configFields.find(function (field) { return !supportedFieldList_1.includes(field); });
134
135
  if (configFields.length > 0 && unSupportedField) {
135
136
  msgText = "The Swico configuration file '".concat(chalk_1.default.blue(configFileName), "' does not support the field '").concat(chalk_1.default.red(unSupportedField), "' ");
@@ -137,16 +138,16 @@ var getProjectConfig = function (env) { return __awaiter(void 0, void 0, void 0,
137
138
  process.exit(1);
138
139
  }
139
140
  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 should be 'vue' or 'react' "), { title: "Swico config => ".concat(configFileName) });
141
+ 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: toastTitle });
141
142
  process.exit(1);
142
143
  }
143
144
  if (key === 'base' &&
144
145
  !['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 should be 'npm' or 'pnpm' "), { title: "Swico config => ".concat(configFileName) });
146
+ 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: toastTitle });
146
147
  process.exit(1);
147
148
  }
148
149
  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 should be 'browser' or 'hash' "), { title: "Swico config => ".concat(configFileName) });
150
+ 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: toastTitle });
150
151
  process.exit(1);
151
152
  }
152
153
  _f = customConfig;