swico 0.9.2 → 0.9.4
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/build.js
CHANGED
|
@@ -51,7 +51,7 @@ 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));
|
|
54
|
+
tools_1.toast.info("Swico v".concat(package_json_1.default.version));
|
|
55
55
|
tools_1.toast.info('Initializing production config...');
|
|
56
56
|
return [4, (0, tools_1.initIndexFile)()];
|
|
57
57
|
case 1:
|
package/src/command/start.js
CHANGED
|
@@ -79,7 +79,9 @@ var handleWatch = function (projectPath, devServer) {
|
|
|
79
79
|
return __generator(this, function (_a) {
|
|
80
80
|
switch (_a.label) {
|
|
81
81
|
case 0:
|
|
82
|
-
tools_1.toast.warning('Swico configuration files
|
|
82
|
+
tools_1.toast.warning('Swico configuration files changed, restarting server...', {
|
|
83
|
+
inline: true
|
|
84
|
+
});
|
|
83
85
|
return [4, devServer.stop()];
|
|
84
86
|
case 1:
|
|
85
87
|
_a.sent();
|
|
@@ -164,7 +166,7 @@ function start() {
|
|
|
164
166
|
case 0:
|
|
165
167
|
process.env.SWICO_ENV = 'dev';
|
|
166
168
|
if (RESTART !== 'true') {
|
|
167
|
-
tools_1.toast.info("v".concat(package_json_1.default.version));
|
|
169
|
+
tools_1.toast.info("Swico v".concat(package_json_1.default.version));
|
|
168
170
|
tools_1.toast.info('Initializing development config...');
|
|
169
171
|
}
|
|
170
172
|
return [4, (0, tools_1.initIndexFile)()];
|
|
@@ -84,7 +84,6 @@ var getPathNameList = function (routes) {
|
|
|
84
84
|
};
|
|
85
85
|
exports.pathNameList = getPathNameList(routes_1.default);
|
|
86
86
|
var getLocation = function (historyLocation) {
|
|
87
|
-
console.log('historyLocation', historyLocation);
|
|
88
87
|
var pathname = historyLocation.pathname, hash = historyLocation.hash, search = historyLocation.search, state = historyLocation.state;
|
|
89
88
|
var routerBaseLength = formatRouterBase.length;
|
|
90
89
|
var path = pathname.slice(routerBaseLength);
|
package/src/utils/tools.js
CHANGED
|
@@ -213,11 +213,11 @@ exports.colorConfig = {
|
|
|
213
213
|
exports.toast = {
|
|
214
214
|
info: function (message, options) {
|
|
215
215
|
var _a = (options || {}).wrap, wrap = _a === void 0 ? false : _a;
|
|
216
|
-
console.log("".concat(chalk_1.default.hex(exports.colorConfig.theme).bold('
|
|
216
|
+
console.log("".concat(chalk_1.default.hex(exports.colorConfig.theme).bold('info'), " - ").concat(message).concat(wrap ? '\n' : ''));
|
|
217
217
|
},
|
|
218
218
|
success: function (message, options) {
|
|
219
219
|
var _a = (options || {}).wrap, wrap = _a === void 0 ? true : _a;
|
|
220
|
-
console.log("".concat(chalk_1.default.hex(exports.colorConfig.success).bold('
|
|
220
|
+
console.log("".concat(chalk_1.default.hex(exports.colorConfig.success).bold('info'), " - ").concat(message).concat(wrap ? '\n' : ''));
|
|
221
221
|
},
|
|
222
222
|
error: function (message, options) {
|
|
223
223
|
var _a = options || {}, inline = _a.inline, title = _a.title;
|