swico 0.8.3-beta6 → 0.8.3-beta7

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-beta6",
3
+ "version": "0.8.3-beta7",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -137,26 +137,19 @@ 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
- console.log('done');
140
+ var _a;
141
141
  var info = stats === null || stats === void 0 ? void 0 : stats.toJson();
142
142
  if (stats === null || stats === void 0 ? void 0 : stats.hasErrors()) {
143
143
  tools_1.toast.error(info === null || info === void 0 ? void 0 : info.errors.map(function (item) { return item.message || item.stack; }));
144
144
  return;
145
145
  }
146
146
  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 === null || first === void 0 ? void 0 : first.chunkName, first === null || first === void 0 ? void 0 : first.moduleName);
147
149
  tools_1.toast.warning(info === null || info === void 0 ? void 0 : info.warnings.map(function (item) { return item.message || item.stack; }));
148
150
  }
149
151
  tools_1.toast.info("Compiled complete in ".concat(info === null || info === void 0 ? void 0 : info.time, "ms"));
150
152
  });
151
- compiler.hooks.afterCompile.tap('afterCompile', function (compilation) {
152
- var errors = compilation.errors, endTime = compilation.endTime;
153
- console.log('afterCompile');
154
- if ((errors === null || errors === void 0 ? void 0 : errors.length) > 0) {
155
- tools_1.toast.error(errors.map(function (item) { return item.message || item.stack; }));
156
- return;
157
- }
158
- tools_1.toast.info("afterCompile in ".concat(endTime, "ms"));
159
- });
160
153
  };
161
154
  function start() {
162
155
  return __awaiter(this, void 0, void 0, function () {