swico 0.8.2-beta14 → 0.8.2-beta15

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.2-beta14",
3
+ "version": "0.8.2-beta15",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -139,10 +139,12 @@ var createCompileListener = function (compiler) {
139
139
  compiler.hooks.done.tap('done', function (stats) {
140
140
  var info = stats === null || stats === void 0 ? void 0 : stats.toJson();
141
141
  if (stats === null || stats === void 0 ? void 0 : stats.hasErrors()) {
142
+ console.log('done-error');
142
143
  tools_1.toast.error(info === null || info === void 0 ? void 0 : info.errors.map(function (item) { return item.message || item.stack; }));
143
144
  return;
144
145
  }
145
146
  if (stats === null || stats === void 0 ? void 0 : stats.hasWarnings()) {
147
+ console.log('done-warning');
146
148
  tools_1.toast.warning(info === null || info === void 0 ? void 0 : info.warnings.map(function (item) { return item.message || item.stack; }));
147
149
  }
148
150
  tools_1.toast.info("Compiled complete in ".concat(info === null || info === void 0 ? void 0 : info.time, "ms"));
@@ -9,8 +9,8 @@ interface ToastOptions {
9
9
  export declare const toast: {
10
10
  info: (message: string, options?: ToastOptions) => void;
11
11
  success: (message: string, options?: ToastOptions) => void;
12
- error: (message: string | string[]) => void;
13
- warning: (message: string | string[]) => void;
12
+ error: (message: string | string[], title?: string) => void;
13
+ warning: (message: string | string[], title?: string) => void;
14
14
  };
15
15
  export declare const initIndexFile: () => Promise<void>;
16
16
  export {};
@@ -214,8 +214,8 @@ exports.toast = {
214
214
  var _a = (options || {}).wrap, wrap = _a === void 0 ? true : _a;
215
215
  console.log("".concat(chalk_1.default.hex('#32f264').bold('swico'), " - ").concat(message).concat(wrap ? '\n' : ''));
216
216
  },
217
- error: function (message) {
218
- console.log("".concat(chalk_1.default.red.bold('error'), " - There are some errors about Swico\uFF1A \n"));
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"));
219
219
  if (Array.isArray(message)) {
220
220
  message.forEach(function (item) {
221
221
  console.log(" > ".concat(chalk_1.default.red.bold(item), " \n"));
@@ -225,8 +225,8 @@ exports.toast = {
225
225
  console.log(" > ".concat(chalk_1.default.red.bold(message), " \n"));
226
226
  }
227
227
  },
228
- warning: function (message) {
229
- console.log("".concat(chalk_1.default.hex('#fb8918').bold('warning'), " - There are some warnings about Swico\uFF1A \n"));
228
+ warning: function (message, title) {
229
+ console.log("".concat(chalk_1.default.hex('#fb8918').bold('warning'), " - ").concat(title || 'There are some warnings about Swico', "\uFF1A \n"));
230
230
  if (Array.isArray(message)) {
231
231
  message.forEach(function (item) {
232
232
  console.log(" > ".concat(chalk_1.default.hex('#fb8918').bold(item), " \n"));