swico 0.8.1-beta10 → 0.8.1-beta12
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
package/src/command/start.js
CHANGED
|
@@ -124,8 +124,9 @@ var restartServer = function () {
|
|
|
124
124
|
};
|
|
125
125
|
var getMockGetLogger = function (compiler) {
|
|
126
126
|
var logger = compiler.getInfrastructureLogger('name');
|
|
127
|
+
var log = logger.log, debug = logger.debug, error = logger.error, warn = logger.warn;
|
|
127
128
|
return function (name) {
|
|
128
|
-
return __assign(__assign({}, logger), { log:
|
|
129
|
+
return __assign(__assign({}, logger), { log: log, debug: debug, error: error, warn: warn, info: function () { } });
|
|
129
130
|
};
|
|
130
131
|
};
|
|
131
132
|
function start() {
|
|
@@ -170,7 +171,7 @@ function start() {
|
|
|
170
171
|
_b.sent();
|
|
171
172
|
compiler.getInfrastructureLogger = oriLogger;
|
|
172
173
|
handleWatch(projectPath, devServer);
|
|
173
|
-
tools_1.toast.info("Project is running at
|
|
174
|
+
tools_1.toast.info("Project is running at\uFF1A".concat(startConfig.devServer.server, "://localhost:").concat(availablePort, "/"));
|
|
174
175
|
return [3, 10];
|
|
175
176
|
case 9:
|
|
176
177
|
e_1 = _b.sent();
|
|
@@ -65,6 +65,7 @@ var config_1 = require("../utils/config");
|
|
|
65
65
|
var html_webpack_plugin_1 = __importDefault(require("html-webpack-plugin"));
|
|
66
66
|
var fork_ts_checker_webpack_plugin_1 = __importDefault(require("fork-ts-checker-webpack-plugin"));
|
|
67
67
|
var webpack_1 = __importDefault(require("webpack"));
|
|
68
|
+
var webpackbar_1 = __importDefault(require("webpackbar"));
|
|
68
69
|
function default_1(_a) {
|
|
69
70
|
var _b, _c, _d;
|
|
70
71
|
var projectPath = _a.projectPath, entryPath = _a.entryPath, env = _a.env, customConfig = _a.customConfig;
|
|
@@ -270,6 +271,11 @@ function default_1(_a) {
|
|
|
270
271
|
new mini_css_extract_plugin_1.default({
|
|
271
272
|
filename: env === 'dev' ? 'css/[name].css' : 'css/[name].[contenthash].css',
|
|
272
273
|
ignoreOrder: true
|
|
274
|
+
}),
|
|
275
|
+
new webpackbar_1.default({
|
|
276
|
+
name: 'Swico',
|
|
277
|
+
color: '#7888FCFF',
|
|
278
|
+
profile: false
|
|
273
279
|
})
|
|
274
280
|
], false), ((customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) || config_1.initConfig.plugins), true)
|
|
275
281
|
}];
|
|
@@ -66,6 +66,7 @@ var html_webpack_plugin_1 = __importDefault(require("html-webpack-plugin"));
|
|
|
66
66
|
var fork_ts_checker_webpack_plugin_1 = __importDefault(require("fork-ts-checker-webpack-plugin"));
|
|
67
67
|
var webpack_1 = __importDefault(require("webpack"));
|
|
68
68
|
var vue_loader_1 = require("vue-loader");
|
|
69
|
+
var webpackbar_1 = __importDefault(require("webpackbar"));
|
|
69
70
|
function default_1(_a) {
|
|
70
71
|
var _b, _c, _d;
|
|
71
72
|
var projectPath = _a.projectPath, entryPath = _a.entryPath, env = _a.env, customConfig = _a.customConfig;
|
|
@@ -287,6 +288,11 @@ function default_1(_a) {
|
|
|
287
288
|
new mini_css_extract_plugin_1.default({
|
|
288
289
|
filename: env === 'dev' ? 'css/[name].css' : 'css/[name].[contenthash].css',
|
|
289
290
|
ignoreOrder: true
|
|
291
|
+
}),
|
|
292
|
+
new webpackbar_1.default({
|
|
293
|
+
name: 'Swico',
|
|
294
|
+
color: '#7888FCFF',
|
|
295
|
+
profile: false
|
|
290
296
|
})
|
|
291
297
|
], false), ((customBaseConfig === null || customBaseConfig === void 0 ? void 0 : customBaseConfig.plugins) || config_1.initConfig.plugins), true)
|
|
292
298
|
}];
|
|
@@ -89,7 +89,6 @@ var fs_extra_1 = __importDefault(require("fs-extra"));
|
|
|
89
89
|
var config_1 = require("../utils/config");
|
|
90
90
|
var webpack_merge_1 = require("webpack-merge");
|
|
91
91
|
var esbuild_loader_1 = require("esbuild-loader");
|
|
92
|
-
var webpackbar_1 = __importDefault(require("webpackbar"));
|
|
93
92
|
var BundleAnalyzerPlugin = webpack_bundle_analyzer_1.default.BundleAnalyzerPlugin;
|
|
94
93
|
var isAnalyze = process.env.ANALYZE === 'true';
|
|
95
94
|
function default_1(options) {
|
|
@@ -156,7 +155,7 @@ function default_1(options) {
|
|
|
156
155
|
}
|
|
157
156
|
}
|
|
158
157
|
},
|
|
159
|
-
plugins: __spreadArray(__spreadArray(__spreadArray(
|
|
158
|
+
plugins: __spreadArray(__spreadArray(__spreadArray([], (isPublicDirExist || copyConfig.length > 0
|
|
160
159
|
? [
|
|
161
160
|
new copy_webpack_plugin_1.default({
|
|
162
161
|
patterns: __spreadArray(__spreadArray([], (isPublicDirExist ? [path_1.default.join(projectPath, '/public')] : []), true), copyConfig, true)
|
|
@@ -177,13 +176,7 @@ function default_1(options) {
|
|
|
177
176
|
logLevel: 'info'
|
|
178
177
|
})
|
|
179
178
|
]
|
|
180
|
-
: []), true), [
|
|
181
|
-
new webpackbar_1.default({
|
|
182
|
-
name: 'Swico',
|
|
183
|
-
color: '#5f72f5',
|
|
184
|
-
profile: false
|
|
185
|
-
})
|
|
186
|
-
], false), ((_g = (_f = customConfig.prod) === null || _f === void 0 ? void 0 : _f.plugins) !== null && _g !== void 0 ? _g : []), true)
|
|
179
|
+
: []), true), ((_g = (_f = customConfig.prod) === null || _f === void 0 ? void 0 : _f.plugins) !== null && _g !== void 0 ? _g : []), true)
|
|
187
180
|
})];
|
|
188
181
|
}
|
|
189
182
|
});
|
package/src/utils/tools.js
CHANGED
|
@@ -206,10 +206,10 @@ var getPort = function () {
|
|
|
206
206
|
exports.getPort = getPort;
|
|
207
207
|
exports.toast = {
|
|
208
208
|
info: function (message) {
|
|
209
|
-
console.log("> ".concat(chalk_1.default.hex('#
|
|
209
|
+
console.log("> ".concat(chalk_1.default.hex('#7888FCFF')(message), "\n"));
|
|
210
210
|
},
|
|
211
211
|
error: function (message) {
|
|
212
|
-
console.log("\n> ".concat(chalk_1.default.hex('#
|
|
212
|
+
console.log("\n> ".concat(chalk_1.default.hex('#7888FCFF')('There are some errors about Swico:'), " \n"));
|
|
213
213
|
if (Array.isArray(message)) {
|
|
214
214
|
message.forEach(function (item) {
|
|
215
215
|
console.log(" > ".concat(chalk_1.default.red.bold(item), " \n"));
|
|
@@ -220,7 +220,7 @@ exports.toast = {
|
|
|
220
220
|
}
|
|
221
221
|
},
|
|
222
222
|
warning: function (message) {
|
|
223
|
-
console.log("\n> ".concat(chalk_1.default.hex('#
|
|
223
|
+
console.log("\n> ".concat(chalk_1.default.hex('#7888FCFF')('There are some warnings about Swico:'), " \n"));
|
|
224
224
|
if (Array.isArray(message)) {
|
|
225
225
|
message.forEach(function (item) {
|
|
226
226
|
console.log(" > ".concat(chalk_1.default.hex('#fb8918').bold(item), " \n"));
|