swico 0.6.0-beta16 → 0.6.0-beta18

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.6.0-beta16",
3
+ "version": "0.6.0-beta18",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -55,7 +55,7 @@ function default_1() {
55
55
  case 0:
56
56
  process.env.SWICO_ENV = 'prod';
57
57
  tools_1.toast.info("Swico v".concat(package_json_1.default.version));
58
- spinner.start('Initializing Swico production config...\n');
58
+ spinner.start('Initializing Swico production config...');
59
59
  return [4, (0, config_1.getProjectConfig)('prod')];
60
60
  case 1:
61
61
  projectConfig = _a.sent();
@@ -126,14 +126,13 @@ var restartServer = function () {
126
126
  };
127
127
  function start() {
128
128
  return __awaiter(this, void 0, void 0, function () {
129
- var _a, projectConfig, projectPath, templateType, startConfig, compiler, devServer, e_1, strErr;
129
+ var _a, projectConfig, projectPath, startConfig, compiler, devServer, e_1, strErr;
130
130
  return __generator(this, function (_b) {
131
131
  switch (_b.label) {
132
132
  case 0:
133
133
  process.env.SWICO_ENV = 'dev';
134
134
  tools_1.toast.info("Swico v".concat(package_json_1.default.version));
135
- spinner.start('Initializing Swico development config...\n');
136
- console.log('11');
135
+ spinner.start('Initializing Swico development config...');
137
136
  if (!(envPort !== null && envPort !== void 0)) return [3, 1];
138
137
  _a = envPort;
139
138
  return [3, 3];
@@ -146,10 +145,7 @@ function start() {
146
145
  return [4, (0, config_1.getProjectConfig)('dev')];
147
146
  case 4:
148
147
  projectConfig = _b.sent();
149
- console.log('22');
150
- projectPath = projectConfig.projectPath, templateType = projectConfig.templateType;
151
- console.log('33');
152
- (0, tools_1.initHookRef)(templateType);
148
+ projectPath = projectConfig.projectPath;
153
149
  return [4, (0, webpack_dev_1.default)(projectConfig)];
154
150
  case 5:
155
151
  startConfig = _b.sent();
@@ -171,6 +171,7 @@ var getProjectConfig = function (env) { return __awaiter(void 0, void 0, void 0,
171
171
  return [3, 1];
172
172
  case 4:
173
173
  templateType = customConfig['base'].template;
174
+ (0, tools_1.initIndexFile)(templateType);
174
175
  routerConfig = __assign(__assign(__assign({}, exports.initConfig.router), customConfig['base'].router), customConfig[env].router);
175
176
  return [4, initTemplateConfig(routerConfig, templateType, env)];
176
177
  case 5:
@@ -6,4 +6,4 @@ export declare const toast: {
6
6
  warning: (message: string | string[]) => void;
7
7
  };
8
8
  export declare const writeFile: (sourcePath: any, text: any) => Promise<unknown>;
9
- export declare const initHookRef: (tempalteType: any) => Promise<void>;
9
+ export declare const initIndexFile: (tempalteType: any) => Promise<void>;
@@ -39,7 +39,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
39
39
  return (mod && mod.__esModule) ? mod : { "default": mod };
40
40
  };
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.initHookRef = exports.writeFile = exports.toast = exports.getPort = exports.copyDirFiles = void 0;
42
+ exports.initIndexFile = exports.writeFile = exports.toast = exports.getPort = exports.copyDirFiles = void 0;
43
43
  var portfinder_1 = __importDefault(require("portfinder"));
44
44
  var fs_extra_1 = __importDefault(require("fs-extra"));
45
45
  var path_1 = __importDefault(require("path"));
@@ -142,7 +142,7 @@ var writeFile = function (sourcePath, text) {
142
142
  });
143
143
  };
144
144
  exports.writeFile = writeFile;
145
- var initHookRef = function (tempalteType) { return __awaiter(void 0, void 0, void 0, function () {
145
+ var initIndexFile = function (tempalteType) { return __awaiter(void 0, void 0, void 0, function () {
146
146
  var fileText, targetPath;
147
147
  return __generator(this, function (_a) {
148
148
  switch (_a.label) {
@@ -158,4 +158,4 @@ var initHookRef = function (tempalteType) { return __awaiter(void 0, void 0, voi
158
158
  }
159
159
  });
160
160
  }); };
161
- exports.initHookRef = initHookRef;
161
+ exports.initIndexFile = initIndexFile;