swico 0.8.2-beta11 → 0.8.2-beta13
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 +2 -13
- package/src/utils/tools.js +1 -1
package/package.json
CHANGED
package/src/command/start.js
CHANGED
|
@@ -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 () {
|
package/src/utils/tools.js
CHANGED
|
@@ -226,7 +226,7 @@ exports.toast = {
|
|
|
226
226
|
}
|
|
227
227
|
},
|
|
228
228
|
warning: function (message) {
|
|
229
|
-
console.log("".concat(chalk_1.default.
|
|
229
|
+
console.log("".concat(chalk_1.default.hex('#fb8918').bold('warning'), " - 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"));
|