swico 1.3.0-beta.5 → 1.3.0-beta.7

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.5",
3
+ "version": "1.3.0-beta.7",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -170,6 +170,11 @@ var getMockGetLogger = function (compiler) {
170
170
  return __assign(__assign({}, logger), { log: log, debug: debug, error: error, warn: warn, info: function () { } });
171
171
  };
172
172
  };
173
+ var filterStyleFileList = [
174
+ "Can't resolve '../../global.less'",
175
+ "Can't resolve '../../global.css'",
176
+ "Can't resolve '../../global.scss'"
177
+ ];
173
178
  var createCompileListener = function (compiler) {
174
179
  compiler.hooks.beforeCompile.tap('beforeCompile', function () {
175
180
  tools_1.toast.info('Compiling...');
@@ -177,7 +182,7 @@ var createCompileListener = function (compiler) {
177
182
  compiler.hooks.done.tap('done', function (stats) {
178
183
  var info = stats === null || stats === void 0 ? void 0 : stats.toJson();
179
184
  if (stats === null || stats === void 0 ? void 0 : stats.hasErrors()) {
180
- tools_1.toast.error(info === null || info === void 0 ? void 0 : info.errors.map(function (item) { return item.message || item.stack; }));
185
+ tools_1.toast.error(info === null || info === void 0 ? void 0 : info.errors.filter(function (item) { return !filterStyleFileList.find(function (item1) { return item.message.includes(item1); }); }).map(function (item) { return item.message || item.stack; }));
181
186
  return;
182
187
  }
183
188
  if (stats === null || stats === void 0 ? void 0 : stats.hasWarnings()) {
@@ -191,7 +196,7 @@ var createCompileListener = function (compiler) {
191
196
  });
192
197
  return;
193
198
  }
194
- tools_1.toast.info("Compiled complete in ".concat(info === null || info === void 0 ? void 0 : info.time, "ms"));
199
+ tools_1.toast.info("Compiled successfully in ".concat(info === null || info === void 0 ? void 0 : info.time, "ms"));
195
200
  });
196
201
  };
197
202
  function start() {
@@ -185,6 +185,7 @@ var getProjectConfig = function (env) { return __awaiter(void 0, void 0, void 0,
185
185
  entryPath = path_1.default.resolve(projectPath, "./src/.swico/".concat(envPath, "index.js"));
186
186
  templatePath = path_1.default.join(projectPath, '/src/index.ejs');
187
187
  return [2, {
188
+ env: env,
188
189
  projectPath: projectPath,
189
190
  entryPath: entryPath,
190
191
  templatePath: templatePath,