swico 0.8.2-beta12 → 0.8.2-beta14

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-beta12",
3
+ "version": "0.8.2-beta14",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -77,11 +77,11 @@ function default_1() {
77
77
  }
78
78
  var info = stats.toJson();
79
79
  if (stats.hasErrors()) {
80
- tools_1.toast.error(info.errors.map(function (item) { return item.stack; }));
80
+ tools_1.toast.error(info.errors.map(function (item) { return item.stack || item.message; }));
81
81
  return;
82
82
  }
83
83
  if (stats.hasWarnings()) {
84
- tools_1.toast.warning(info.warnings.map(function (item) { return item.stack; }));
84
+ tools_1.toast.warning(info.warnings.map(function (item) { return item.stack || item.message; }));
85
85
  }
86
86
  tools_1.toast.success('Building complete');
87
87
  });
@@ -136,28 +136,17 @@ var createCompileListener = function (compiler) {
136
136
  compiler.hooks.beforeCompile.tap('beforeCompile', function () {
137
137
  tools_1.toast.info('Compiling...', { wrap: false });
138
138
  });
139
- compiler.hooks;
140
139
  compiler.hooks.done.tap('done', function (stats) {
141
- console.log('done');
142
140
  var info = stats === null || stats === void 0 ? void 0 : stats.toJson();
143
141
  if (stats === null || stats === void 0 ? void 0 : stats.hasErrors()) {
144
- tools_1.toast.error(info === null || info === void 0 ? void 0 : info.errors.map(function (item) { return item.stack; }));
142
+ tools_1.toast.error(info === null || info === void 0 ? void 0 : info.errors.map(function (item) { return item.message || item.stack; }));
145
143
  return;
146
144
  }
147
145
  if (stats === null || stats === void 0 ? void 0 : stats.hasWarnings()) {
148
- tools_1.toast.warning(info === null || info === void 0 ? void 0 : info.warnings.map(function (item) { return item.stack; }));
146
+ tools_1.toast.warning(info === null || info === void 0 ? void 0 : info.warnings.map(function (item) { return item.message || item.stack; }));
149
147
  }
150
148
  tools_1.toast.info("Compiled complete in ".concat(info === null || info === void 0 ? void 0 : info.time, "ms"));
151
149
  });
152
- compiler.watch({}, function (err, stats) {
153
- var _a, _b;
154
- console.log('watch');
155
- var info = stats === null || stats === void 0 ? void 0 : stats.toJson();
156
- if (err || ((_a = stats === null || stats === void 0 ? void 0 : stats.hasErrors) === null || _a === void 0 ? void 0 : _a.call(stats)) || ((_b = stats.hasWarnings) === null || _b === void 0 ? void 0 : _b.call(stats))) {
157
- return;
158
- }
159
- tools_1.toast.info("Compiled successfully in ".concat(info === null || info === void 0 ? void 0 : info.time, "ms"), { wrap: false });
160
- });
161
150
  };
162
151
  function start() {
163
152
  return __awaiter(this, void 0, void 0, function () {
@@ -129,8 +129,9 @@ function default_1(options) {
129
129
  new eslint_webpack_plugin_1.default({
130
130
  context: path_1.default.join(projectPath, '/src'),
131
131
  failOnError: false,
132
- failOnWarning: false,
132
+ failOnWarning: true,
133
133
  extensions: templateType === 'vue' ? ['vue', 'ts', 'js'] : ['tsx', 'ts', 'js'],
134
+ emitWarning: false,
134
135
  cache: true
135
136
  })
136
137
  ], ((_e = (_d = customConfig.dev) === null || _d === void 0 ? void 0 : _d.plugins) !== null && _e !== void 0 ? _e : []), true)