swico 0.8.1-beta17 → 0.8.1-beta19

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": "0.8.1-beta17",
3
+ "version": "0.8.1-beta19",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -170,7 +170,6 @@ function start() {
170
170
  return;
171
171
  }
172
172
  var info = stats.toJson();
173
- console.log('info', info.name);
174
173
  if (stats.hasErrors()) {
175
174
  tools_1.toast.error(info.errors.map(function (item) { return item.stack; }));
176
175
  return;
@@ -178,7 +177,7 @@ function start() {
178
177
  if (stats.hasWarnings()) {
179
178
  tools_1.toast.warning(info.warnings.map(function (item) { return item.stack; }));
180
179
  }
181
- tools_1.toast.success('Building complete');
180
+ console.log("Compiled successfully in ".concat(info.time, "ms"));
182
181
  });
183
182
  _b.label = 7;
184
183
  case 7:
@@ -65,8 +65,6 @@ var config_1 = require("../utils/config");
65
65
  var html_webpack_plugin_1 = __importDefault(require("html-webpack-plugin"));
66
66
  var fork_ts_checker_webpack_plugin_1 = __importDefault(require("fork-ts-checker-webpack-plugin"));
67
67
  var webpack_1 = __importDefault(require("webpack"));
68
- var webpackbar_1 = __importDefault(require("webpackbar"));
69
- var tools_1 = require("../utils/tools");
70
68
  function default_1(_a) {
71
69
  var _b, _c, _d;
72
70
  var projectPath = _a.projectPath, entryPath = _a.entryPath, env = _a.env, customConfig = _a.customConfig;
@@ -272,11 +270,6 @@ function default_1(_a) {
272
270
  new mini_css_extract_plugin_1.default({
273
271
  filename: env === 'dev' ? 'css/[name].css' : 'css/[name].[contenthash].css',
274
272
  ignoreOrder: true
275
- }),
276
- new webpackbar_1.default({
277
- name: 'Swico',
278
- color: tools_1.themeColor,
279
- profile: false
280
273
  })
281
274
  ], false), ((customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) || config_1.initConfig.plugins), true)
282
275
  }];
@@ -66,8 +66,6 @@ var html_webpack_plugin_1 = __importDefault(require("html-webpack-plugin"));
66
66
  var fork_ts_checker_webpack_plugin_1 = __importDefault(require("fork-ts-checker-webpack-plugin"));
67
67
  var webpack_1 = __importDefault(require("webpack"));
68
68
  var vue_loader_1 = require("vue-loader");
69
- var webpackbar_1 = __importDefault(require("webpackbar"));
70
- var tools_1 = require("../utils/tools");
71
69
  function default_1(_a) {
72
70
  var _b, _c, _d;
73
71
  var projectPath = _a.projectPath, entryPath = _a.entryPath, env = _a.env, customConfig = _a.customConfig;
@@ -289,11 +287,6 @@ function default_1(_a) {
289
287
  new mini_css_extract_plugin_1.default({
290
288
  filename: env === 'dev' ? 'css/[name].css' : 'css/[name].[contenthash].css',
291
289
  ignoreOrder: true
292
- }),
293
- new webpackbar_1.default({
294
- name: 'Swico',
295
- color: tools_1.themeColor,
296
- profile: false
297
290
  })
298
291
  ], false), ((customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) || config_1.initConfig.plugins), true)
299
292
  }];
@@ -89,6 +89,8 @@ var fs_extra_1 = __importDefault(require("fs-extra"));
89
89
  var config_1 = require("../utils/config");
90
90
  var webpack_merge_1 = require("webpack-merge");
91
91
  var esbuild_loader_1 = require("esbuild-loader");
92
+ var webpackbar_1 = __importDefault(require("webpackbar"));
93
+ var tools_1 = require("../utils/tools");
92
94
  var BundleAnalyzerPlugin = webpack_bundle_analyzer_1.default.BundleAnalyzerPlugin;
93
95
  var isAnalyze = process.env.ANALYZE === 'true';
94
96
  function default_1(options) {
@@ -155,7 +157,7 @@ function default_1(options) {
155
157
  }
156
158
  }
157
159
  },
158
- plugins: __spreadArray(__spreadArray(__spreadArray([], (isPublicDirExist || copyConfig.length > 0
160
+ plugins: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], (isPublicDirExist || copyConfig.length > 0
159
161
  ? [
160
162
  new copy_webpack_plugin_1.default({
161
163
  patterns: __spreadArray(__spreadArray([], (isPublicDirExist ? [path_1.default.join(projectPath, '/public')] : []), true), copyConfig, true)
@@ -176,7 +178,13 @@ function default_1(options) {
176
178
  logLevel: 'info'
177
179
  })
178
180
  ]
179
- : []), true), ((_g = (_f = customConfig.prod) === null || _f === void 0 ? void 0 : _f.plugins) !== null && _g !== void 0 ? _g : []), true)
181
+ : []), true), [
182
+ new webpackbar_1.default({
183
+ name: 'Swico',
184
+ color: tools_1.themeColor,
185
+ profile: false
186
+ })
187
+ ], false), ((_g = (_f = customConfig.prod) === null || _f === void 0 ? void 0 : _f.plugins) !== null && _g !== void 0 ? _g : []), true)
180
188
  })];
181
189
  }
182
190
  });
@@ -209,13 +209,13 @@ exports.getPort = getPort;
209
209
  exports.themeColor = '#7888FCFF';
210
210
  exports.toast = {
211
211
  info: function (message) {
212
- console.log("> ".concat(chalk_1.default.hex(exports.themeColor)(message), "\n"));
212
+ console.log(" ".concat(chalk_1.default.hex(exports.themeColor)('info'), "-").concat(message, "\n"));
213
213
  },
214
214
  success: function (message) {
215
- console.log("> ".concat(chalk_1.default.hex('#32f264')(message), "\n"));
215
+ console.log(" ".concat(chalk_1.default.hex('#32f264')('info'), "-").concat(message, "\n"));
216
216
  },
217
217
  error: function (message) {
218
- console.log("\n> ".concat(chalk_1.default.hex(exports.themeColor)('There are some errors about Swico:'), " \n"));
218
+ console.log(" ".concat(chalk_1.default.red('error'), "-There are some errors about Swico\uFF1A \n"));
219
219
  if (Array.isArray(message)) {
220
220
  message.forEach(function (item) {
221
221
  console.log(" > ".concat(chalk_1.default.red.bold(item), " \n"));
@@ -226,7 +226,7 @@ exports.toast = {
226
226
  }
227
227
  },
228
228
  warning: function (message) {
229
- console.log("\n> ".concat(chalk_1.default.hex(exports.themeColor)('There are some warnings about Swico:'), " \n"));
229
+ console.log("> ".concat(chalk_1.default.red('#fb8918'), "-There are some errors 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"));