swico 0.8.4-beta2 → 0.8.4-beta4

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.4-beta2",
3
+ "version": "0.8.4-beta4",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -51,8 +51,8 @@ function default_1() {
51
51
  switch (_a.label) {
52
52
  case 0:
53
53
  process.env.SWICO_ENV = 'prod';
54
- tools_1.toast.info("v".concat(package_json_1.default.version), { wrap: false });
55
- tools_1.toast.info('Initializing production config...', { wrap: false });
54
+ tools_1.toast.info("v".concat(package_json_1.default.version));
55
+ tools_1.toast.info('Initializing production config...');
56
56
  return [4, (0, tools_1.initIndexFile)()];
57
57
  case 1:
58
58
  _a.sent();
@@ -134,7 +134,7 @@ var getMockGetLogger = function (compiler) {
134
134
  };
135
135
  var createCompileListener = function (compiler) {
136
136
  compiler.hooks.beforeCompile.tap('beforeCompile', function () {
137
- tools_1.toast.info('Compiling...', { wrap: false });
137
+ tools_1.toast.info('Compiling...');
138
138
  });
139
139
  compiler.hooks.done.tap('done', function (stats) {
140
140
  var info = stats === null || stats === void 0 ? void 0 : stats.toJson();
@@ -164,8 +164,8 @@ function start() {
164
164
  case 0:
165
165
  process.env.SWICO_ENV = 'dev';
166
166
  if (RESTART !== 'true') {
167
- tools_1.toast.info("v".concat(package_json_1.default.version), { wrap: false });
168
- tools_1.toast.info('Initializing development config...', { wrap: false });
167
+ tools_1.toast.info("v".concat(package_json_1.default.version));
168
+ tools_1.toast.info('Initializing development config...');
169
169
  }
170
170
  return [4, (0, tools_1.initIndexFile)()];
171
171
  case 1:
@@ -199,7 +199,9 @@ function start() {
199
199
  createCompileListener(compiler);
200
200
  compiler.getInfrastructureLogger = oriLogger;
201
201
  handleWatch(projectPath, devServer);
202
- tools_1.toast.info("Project is running at\uFF1A".concat(chalk_1.default.hex('#29abe0')("".concat(startConfig.devServer.server, "://localhost:").concat(availablePort, "/"))), { wrap: false });
202
+ if (RESTART !== 'true') {
203
+ tools_1.toast.info("Project is running at\uFF1A".concat(chalk_1.default.hex('#29abe0')("".concat(startConfig.devServer.server, "://localhost:").concat(availablePort, "/"))));
204
+ }
203
205
  return [3, 10];
204
206
  case 9:
205
207
  e_1 = _b.sent();
@@ -132,7 +132,7 @@ var getProjectConfig = function (env) { return __awaiter(void 0, void 0, void 0,
132
132
  }
133
133
  unSupportedField = configFields.find(function (field) { return !supportedFieldList_1.includes(field); });
134
134
  if (configFields.length > 0 && unSupportedField) {
135
- msgText = "\n The Swico configuration file '".concat(chalk_1.default.blue(configFileName), "' does not support the field '").concat(chalk_1.default.red(unSupportedField), "' ");
135
+ msgText = "The Swico configuration file '".concat(chalk_1.default.blue(configFileName), "' does not support the field '").concat(chalk_1.default.red(unSupportedField), "' ");
136
136
  tools_1.toast.error(msgText);
137
137
  process.exit();
138
138
  }
@@ -212,7 +212,7 @@ exports.colorConfig = {
212
212
  };
213
213
  exports.toast = {
214
214
  info: function (message, options) {
215
- var _a = (options || {}).wrap, wrap = _a === void 0 ? true : _a;
215
+ var _a = (options || {}).wrap, wrap = _a === void 0 ? false : _a;
216
216
  console.log("".concat(chalk_1.default.hex(exports.colorConfig.theme).bold('swico'), " - ").concat(message).concat(wrap ? '\n' : ''));
217
217
  },
218
218
  success: function (message, options) {
@@ -222,10 +222,10 @@ exports.toast = {
222
222
  error: function (message, options) {
223
223
  var _a = options || {}, inline = _a.inline, title = _a.title;
224
224
  if (inline) {
225
- console.log("".concat(chalk_1.default.red.bold('error'), " - ").concat(message, "\uFF1A}"));
225
+ console.log("".concat(chalk_1.default.red.bold('error'), " - ").concat(message));
226
226
  }
227
227
  else {
228
- console.log("".concat(chalk_1.default.red.bold('error'), " - ").concat(inline ? message : "".concat(title || 'There are some errors about Swico', "\uFF1A")));
228
+ console.log("".concat(chalk_1.default.red.bold('error'), " - ").concat(title || 'There are some errors about Swico', "\uFF1A"));
229
229
  if (Array.isArray(message)) {
230
230
  message.forEach(function (item) {
231
231
  console.log("> ".concat(chalk_1.default.red.bold(item)));
@@ -235,16 +235,15 @@ exports.toast = {
235
235
  console.log("> ".concat(chalk_1.default.red.bold(message)));
236
236
  }
237
237
  }
238
- console.log('\n');
239
238
  },
240
239
  warning: function (message, options) {
241
240
  var _a = options || {}, inline = _a.inline, title = _a.title;
242
241
  var color = exports.colorConfig.warning;
243
242
  if (inline) {
244
- console.log("".concat(chalk_1.default.hex(color).bold('warning'), " - ").concat(message, "\uFF1A}"));
243
+ console.log("".concat(chalk_1.default.hex(color).bold('warning'), " - ").concat(message));
245
244
  }
246
245
  else {
247
- console.log("".concat(chalk_1.default.hex(color).bold('warning'), " - ").concat(inline ? message : "".concat(title || 'There are some warnings about Swico', "\uFF1A")));
246
+ console.log("".concat(chalk_1.default.hex(color).bold('warning'), " - ").concat(title || 'There are some warnings about Swico', "\uFF1A"));
248
247
  if (Array.isArray(message)) {
249
248
  message.forEach(function (item) {
250
249
  console.log("> ".concat(chalk_1.default.hex(color).bold(item)));
@@ -254,7 +253,6 @@ exports.toast = {
254
253
  console.log("> ".concat(chalk_1.default.hex(color).bold(message)));
255
254
  }
256
255
  }
257
- console.log('\n');
258
256
  }
259
257
  };
260
258
  var initIndexFile = function () { return __awaiter(void 0, void 0, void 0, function () {