swico 0.8.2-beta4 → 0.8.2-beta5
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 +2 -2
- package/src/command/start.js +12 -12
package/package.json
CHANGED
package/src/command/build.js
CHANGED
|
@@ -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));
|
|
55
|
-
tools_1.toast.info('Initializing production config...');
|
|
54
|
+
tools_1.toast.info("v".concat(package_json_1.default.version), { wrap: false });
|
|
55
|
+
tools_1.toast.info('Initializing production config...', { wrap: false });
|
|
56
56
|
return [4, (0, tools_1.initIndexFile)()];
|
|
57
57
|
case 1:
|
|
58
58
|
_a.sent();
|
package/src/command/start.js
CHANGED
|
@@ -140,8 +140,8 @@ function start() {
|
|
|
140
140
|
case 0:
|
|
141
141
|
process.env.SWICO_ENV = 'dev';
|
|
142
142
|
if (RESTART !== 'true') {
|
|
143
|
-
tools_1.toast.info("v".concat(package_json_1.default.version));
|
|
144
|
-
tools_1.toast.info('Initializing development config...');
|
|
143
|
+
tools_1.toast.info("v".concat(package_json_1.default.version), { wrap: false });
|
|
144
|
+
tools_1.toast.info('Initializing development config...', { wrap: false });
|
|
145
145
|
}
|
|
146
146
|
return [4, (0, tools_1.initIndexFile)()];
|
|
147
147
|
case 1:
|
|
@@ -166,25 +166,25 @@ function start() {
|
|
|
166
166
|
oriLogger = compiler.getInfrastructureLogger;
|
|
167
167
|
compiler.getInfrastructureLogger = getMockGetLogger(compiler);
|
|
168
168
|
devServer = new webpack_dev_server_1.default(__assign(__assign({}, startConfig.devServer), { port: availablePort }), compiler);
|
|
169
|
+
_b.label = 7;
|
|
170
|
+
case 7:
|
|
171
|
+
_b.trys.push([7, 9, , 10]);
|
|
172
|
+
return [4, devServer.start()];
|
|
173
|
+
case 8:
|
|
174
|
+
_b.sent();
|
|
169
175
|
compiler.hooks.beforeCompile.tap('beforeCompile', function () {
|
|
170
176
|
tools_1.toast.info('Compiling...', { wrap: false });
|
|
171
177
|
});
|
|
172
|
-
compiler.
|
|
178
|
+
compiler.hooks.done.tap('done', function (stats) {
|
|
173
179
|
var info = stats.toJson();
|
|
174
|
-
if (
|
|
180
|
+
if (stats.hasErrors() || stats.hasWarnings()) {
|
|
175
181
|
return;
|
|
176
182
|
}
|
|
177
|
-
tools_1.toast.info("Compiled
|
|
183
|
+
tools_1.toast.info("Compiled complete in ".concat(info.time, "ms"));
|
|
178
184
|
});
|
|
179
|
-
_b.label = 7;
|
|
180
|
-
case 7:
|
|
181
|
-
_b.trys.push([7, 9, , 10]);
|
|
182
|
-
return [4, devServer.start()];
|
|
183
|
-
case 8:
|
|
184
|
-
_b.sent();
|
|
185
185
|
compiler.getInfrastructureLogger = oriLogger;
|
|
186
186
|
handleWatch(projectPath, devServer);
|
|
187
|
-
tools_1.toast.info("Project is running at\uFF1A".concat(
|
|
187
|
+
tools_1.toast.info("Project is running at\uFF1A".concat(chalk_1.default.hex('#29abe0')("".concat(startConfig.devServer.server, "://localhost:").concat(availablePort, "/"))), { wrap: false });
|
|
188
188
|
return [3, 10];
|
|
189
189
|
case 9:
|
|
190
190
|
e_1 = _b.sent();
|