swico 0.6.0-beta17 → 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 +1 -1
- package/src/command/build.js +1 -2
- package/src/command/start.js +3 -4
- package/src/utils/config.js +1 -0
package/package.json
CHANGED
package/src/command/build.js
CHANGED
|
@@ -55,12 +55,11 @@ 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
|
|
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();
|
|
62
62
|
entryPath = projectConfig.entryPath, templatePath = projectConfig.templatePath, projectPath = projectConfig.projectPath, customConfig = projectConfig.customConfig, templateType = projectConfig.templateType;
|
|
63
|
-
(0, tools_1.initIndexFile)(templateType);
|
|
64
63
|
return [4, (0, webpack_prod_1.default)({
|
|
65
64
|
entryPath: entryPath,
|
|
66
65
|
templatePath: templatePath,
|
package/src/command/start.js
CHANGED
|
@@ -126,13 +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,
|
|
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
|
|
135
|
+
spinner.start('Initializing Swico development config...');
|
|
136
136
|
if (!(envPort !== null && envPort !== void 0)) return [3, 1];
|
|
137
137
|
_a = envPort;
|
|
138
138
|
return [3, 3];
|
|
@@ -145,8 +145,7 @@ function start() {
|
|
|
145
145
|
return [4, (0, config_1.getProjectConfig)('dev')];
|
|
146
146
|
case 4:
|
|
147
147
|
projectConfig = _b.sent();
|
|
148
|
-
projectPath = projectConfig.projectPath
|
|
149
|
-
(0, tools_1.initIndexFile)(templateType);
|
|
148
|
+
projectPath = projectConfig.projectPath;
|
|
150
149
|
return [4, (0, webpack_dev_1.default)(projectConfig)];
|
|
151
150
|
case 5:
|
|
152
151
|
startConfig = _b.sent();
|
package/src/utils/config.js
CHANGED
|
@@ -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:
|