swico 1.3.0-beta.11 → 1.3.0-beta.13

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": "1.3.0-beta.11",
3
+ "version": "1.3.0-beta.13",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -119,9 +119,7 @@ var handleWatch = function (projectPath, devServer, env) {
119
119
  case filePath === loadingFilePath: return [3, 7];
120
120
  }
121
121
  return [3, 9];
122
- case 2:
123
- console.log('1');
124
- return [4, devServer.stop()];
122
+ case 2: return [4, devServer.stop()];
125
123
  case 3:
126
124
  _b.sent();
127
125
  return [4, tsTypingsWatcher.close()];
@@ -130,14 +128,12 @@ var handleWatch = function (projectPath, devServer, env) {
130
128
  restartServer();
131
129
  return [3, 9];
132
130
  case 5:
133
- console.log('2');
134
131
  replaceIndexText = (0, config_1.handleGlobalStyleFile)(replaceIndexText);
135
132
  return [4, (0, config_1.updateIndexFileText)(envPath, replaceIndexText)];
136
133
  case 6:
137
134
  _b.sent();
138
135
  return [3, 9];
139
136
  case 7:
140
- console.log('3');
141
137
  replaceIndexText = (0, config_1.handleLoadingFile)(replaceIndexText, envPath);
142
138
  return [4, (0, config_1.updateIndexFileText)(envPath, replaceIndexText)];
143
139
  case 8:
@@ -182,6 +178,16 @@ var createCompileListener = function (compiler) {
182
178
  compiler.hooks.done.tap('done', function (stats) {
183
179
  var info = stats === null || stats === void 0 ? void 0 : stats.toJson();
184
180
  if (stats === null || stats === void 0 ? void 0 : stats.hasErrors()) {
181
+ console.log('1');
182
+ var formatErrors = info === null || info === void 0 ? void 0 : info.errors.map(function (item) { return item.message || item.stack; });
183
+ console.log('formatErrors', formatErrors);
184
+ var filterErrors = formatErrors.filter(function (item1) {
185
+ return !filterStyleFileList.find(function (item2) {
186
+ console.log('item1', item1);
187
+ console.log('item2', item2);
188
+ return item1.includes(item2);
189
+ });
190
+ });
185
191
  tools_1.toast.error(info === null || info === void 0 ? void 0 : info.errors.map(function (item) { return item.message || item.stack; }).filter(function (item1) { return !filterStyleFileList.find(function (item2) { return item1.includes(item2); }); }));
186
192
  return;
187
193
  }
@@ -202,7 +208,7 @@ var createCompileListener = function (compiler) {
202
208
  function start() {
203
209
  var _a, _b, _c, _d, _e, _f;
204
210
  return __awaiter(this, void 0, void 0, function () {
205
- var availablePort, _g, projectConfig, projectPath, customConfig, env, newRouterBase, startConfig, compiler, oriLogger, devServer, e_1, strErr;
211
+ var availablePort, _g, projectConfig, projectPath, customConfig, env, newRouterBase, startConfig, compiler, oriLogger, devServer, e_1, strErr_1;
206
212
  return __generator(this, function (_h) {
207
213
  switch (_h.label) {
208
214
  case 0:
@@ -254,8 +260,11 @@ function start() {
254
260
  return [3, 10];
255
261
  case 9:
256
262
  e_1 = _h.sent();
257
- strErr = e_1.toString();
258
- tools_1.toast.error(strErr);
263
+ strErr_1 = e_1.toString();
264
+ console.log('2', strErr_1);
265
+ if (!filterStyleFileList.find(function (item) { return strErr_1.includes(item); })) {
266
+ tools_1.toast.error(strErr_1);
267
+ }
259
268
  return [3, 10];
260
269
  case 10: return [2];
261
270
  }