swico 1.3.3 → 1.4.0-beta.1

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.3",
3
+ "version": "1.4.0-beta.1",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -83,7 +83,7 @@ function default_1() {
83
83
  if (stats.hasWarnings()) {
84
84
  tools_1.toast.warning(info.warnings.map(function (item) { return item.stack || item.message; }));
85
85
  }
86
- tools_1.toast.success('Building complete');
86
+ tools_1.toast.success('Build complete');
87
87
  });
88
88
  return [2];
89
89
  }
@@ -189,7 +189,7 @@ var createCompileListener = function (compiler) {
189
189
  }
190
190
  });
191
191
  }
192
- tools_1.toast.info("Compiled successfully in ".concat(info === null || info === void 0 ? void 0 : info.time, "ms"));
192
+ tools_1.toast.info("Compiled successfully ".concat((info === null || info === void 0 ? void 0 : info.time) ? "in ".concat(info.time / 1000, " s") : ''));
193
193
  });
194
194
  };
195
195
  function start() {
package/src/task.js CHANGED
@@ -55,7 +55,22 @@ var copyVueFiles = function () { return __awaiter(void 0, void 0, void 0, functi
55
55
  }
56
56
  });
57
57
  }); };
58
+ var copyReadMeFiles = function () { return __awaiter(void 0, void 0, void 0, function () {
59
+ var filePath, targetPath;
60
+ return __generator(this, function (_a) {
61
+ switch (_a.label) {
62
+ case 0:
63
+ filePath = path_1.default.resolve(__dirname, '../README.md');
64
+ targetPath = path_1.default.resolve(__dirname, '../dist/README.md');
65
+ return [4, fs_extra_1.default.copyFile(filePath, targetPath)];
66
+ case 1:
67
+ _a.sent();
68
+ return [2];
69
+ }
70
+ });
71
+ }); };
58
72
  var main = function () {
59
73
  copyVueFiles();
74
+ copyReadMeFiles();
60
75
  };
61
76
  main();
@@ -15,7 +15,7 @@ export type ConfigRouterType = {
15
15
  };
16
16
  export interface GlobalSwicoConfigType {
17
17
  template: 'react' | 'vue';
18
- npmType?: 'npm' | 'pnpm';
18
+ npmType?: 'npm';
19
19
  plugins?: any[];
20
20
  publicPath?: string;
21
21
  console?: boolean;
@@ -141,9 +141,8 @@ var getProjectConfig = function (env) { return __awaiter(void 0, void 0, void 0,
141
141
  tools_1.toast.error("The field '".concat(chalk_1.default.blue('template'), "' does not support the value '").concat(chalk_1.default.red(configObj['template']), "',the value should be 'vue' or 'react' "), { title: toastTitle });
142
142
  process.exit(1);
143
143
  }
144
- if (key === 'base' &&
145
- !['npm', 'pnpm'].includes((_b = configObj['npmType']) !== null && _b !== void 0 ? _b : exports.initConfig.npmType)) {
146
- tools_1.toast.error("The field '".concat(chalk_1.default.blue('npmType'), "' does not support the value '").concat(chalk_1.default.red(configObj['npmType']), "',the value should be 'npm' or 'pnpm' "), { title: toastTitle });
144
+ if (key === 'base' && !['npm'].includes((_b = configObj['npmType']) !== null && _b !== void 0 ? _b : exports.initConfig.npmType)) {
145
+ tools_1.toast.error("The field '".concat(chalk_1.default.blue('npmType'), "' does not support the value '").concat(chalk_1.default.red(configObj['npmType']), "',the value should be 'npm' "), { title: toastTitle });
147
146
  process.exit(1);
148
147
  }
149
148
  if (!['hash', 'browser'].includes((_d = (_c = configObj['router']) === null || _c === void 0 ? void 0 : _c.type) !== null && _d !== void 0 ? _d : exports.initConfig.router.type)) {