swico 0.8.3-beta6 → 0.8.3-beta8
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 +1 -1
- package/src/command/start.js +3 -10
package/package.json
CHANGED
package/src/command/start.js
CHANGED
|
@@ -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
|
-
|
|
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);
|
|
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 () {
|