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
package/src/command/start.js
CHANGED
|
@@ -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
|
|
148
|
-
|
|
149
|
-
|
|
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
|
});
|
package/src/utils/tools.js
CHANGED
|
@@ -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
|
|
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
|
|
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)));
|