swico 0.8.3-beta8 → 0.8.3

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.3-beta8",
3
+ "version": "0.8.3",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -137,16 +137,21 @@ var createCompileListener = function (compiler) {
137
137
  tools_1.toast.info('Compiling...', { wrap: false });
138
138
  });
139
139
  compiler.hooks.done.tap('done', function (stats) {
140
- var _a;
141
140
  var info = stats === null || stats === void 0 ? void 0 : stats.toJson();
142
141
  if (stats === null || stats === void 0 ? void 0 : stats.hasErrors()) {
143
142
  tools_1.toast.error(info === null || info === void 0 ? void 0 : info.errors.map(function (item) { return item.message || item.stack; }));
144
143
  return;
145
144
  }
146
145
  if (stats === null || stats === void 0 ? void 0 : stats.hasWarnings()) {
147
- var first = (_a = info.warnings) === null || _a === void 0 ? void 0 : _a[0];
148
- console.log('eslint', first);
149
- tools_1.toast.warning(info === null || info === void 0 ? void 0 : info.warnings.map(function (item) { return item.message || item.stack; }));
146
+ var warnings = info.warnings;
147
+ warnings.some(function (item) {
148
+ var msg = item.message || item.stack;
149
+ if (msg.startsWith('[eslint]')) {
150
+ tools_1.toast.warning(msg, 'ESLint errors');
151
+ return;
152
+ }
153
+ });
154
+ return;
150
155
  }
151
156
  tools_1.toast.info("Compiled complete in ".concat(info === null || info === void 0 ? void 0 : info.time, "ms"));
152
157
  });
@@ -264,7 +264,7 @@ function default_1(_a) {
264
264
  logger: {
265
265
  log: function () { },
266
266
  error: function (message) {
267
- tools_1.toast.error(message, 'TypeScript Error');
267
+ tools_1.toast.error(message, 'TypeScript errors');
268
268
  }
269
269
  },
270
270
  typescript: {
@@ -281,7 +281,7 @@ function default_1(_a) {
281
281
  logger: {
282
282
  log: function () { },
283
283
  error: function (message) {
284
- tools_1.toast.error(message, 'TypeScript Error');
284
+ tools_1.toast.error(message, 'TypeScript errors');
285
285
  }
286
286
  },
287
287
  typescript: {
@@ -215,7 +215,7 @@ exports.toast = {
215
215
  console.log("".concat(chalk_1.default.hex('#32f264').bold('swico'), " - ").concat(message).concat(wrap ? '\n' : ''));
216
216
  },
217
217
  error: function (message, title) {
218
- console.log("".concat(chalk_1.default.red.bold('error'), " - ").concat(title || 'There are some errors about Swico', "\uFF1A \n"));
218
+ console.log("".concat(chalk_1.default.red.bold('error'), " - ").concat(title || 'There are some errors about Swico', "\uFF1A"));
219
219
  if (Array.isArray(message)) {
220
220
  message.forEach(function (item) {
221
221
  console.log("> ".concat(chalk_1.default.red.bold(item)));
@@ -227,7 +227,7 @@ exports.toast = {
227
227
  console.log('\n');
228
228
  },
229
229
  warning: function (message, title) {
230
- console.log("".concat(chalk_1.default.hex('#fb8918').bold('warning'), " - ").concat(title || 'There are some warnings about Swico', "\uFF1A \n"));
230
+ console.log("".concat(chalk_1.default.hex('#fb8918').bold('warning'), " - ").concat(title || 'There are some warnings about Swico', "\uFF1A"));
231
231
  if (Array.isArray(message)) {
232
232
  message.forEach(function (item) {
233
233
  console.log("> ".concat(chalk_1.default.hex('#fb8918').bold(item)));