swico 1.3.3 → 1.4.0-beta.1
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 -1
- package/src/command/start.js +1 -1
- package/src/task.js +15 -0
- package/src/utils/config.d.ts +1 -1
- package/src/utils/config.js +2 -3
package/package.json
CHANGED
package/src/command/build.js
CHANGED
|
@@ -83,7 +83,7 @@ function default_1() {
|
|
|
83
83
|
if (stats.hasWarnings()) {
|
|
84
84
|
tools_1.toast.warning(info.warnings.map(function (item) { return item.stack || item.message; }));
|
|
85
85
|
}
|
|
86
|
-
tools_1.toast.success('
|
|
86
|
+
tools_1.toast.success('Build complete');
|
|
87
87
|
});
|
|
88
88
|
return [2];
|
|
89
89
|
}
|
package/src/command/start.js
CHANGED
|
@@ -189,7 +189,7 @@ var createCompileListener = function (compiler) {
|
|
|
189
189
|
}
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
|
-
tools_1.toast.info("Compiled successfully
|
|
192
|
+
tools_1.toast.info("Compiled successfully ".concat((info === null || info === void 0 ? void 0 : info.time) ? "in ".concat(info.time / 1000, " s") : ''));
|
|
193
193
|
});
|
|
194
194
|
};
|
|
195
195
|
function start() {
|
package/src/task.js
CHANGED
|
@@ -55,7 +55,22 @@ var copyVueFiles = function () { return __awaiter(void 0, void 0, void 0, functi
|
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
57
|
}); };
|
|
58
|
+
var copyReadMeFiles = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
|
+
var filePath, targetPath;
|
|
60
|
+
return __generator(this, function (_a) {
|
|
61
|
+
switch (_a.label) {
|
|
62
|
+
case 0:
|
|
63
|
+
filePath = path_1.default.resolve(__dirname, '../README.md');
|
|
64
|
+
targetPath = path_1.default.resolve(__dirname, '../dist/README.md');
|
|
65
|
+
return [4, fs_extra_1.default.copyFile(filePath, targetPath)];
|
|
66
|
+
case 1:
|
|
67
|
+
_a.sent();
|
|
68
|
+
return [2];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}); };
|
|
58
72
|
var main = function () {
|
|
59
73
|
copyVueFiles();
|
|
74
|
+
copyReadMeFiles();
|
|
60
75
|
};
|
|
61
76
|
main();
|
package/src/utils/config.d.ts
CHANGED
package/src/utils/config.js
CHANGED
|
@@ -141,9 +141,8 @@ var getProjectConfig = function (env) { return __awaiter(void 0, void 0, void 0,
|
|
|
141
141
|
tools_1.toast.error("The field '".concat(chalk_1.default.blue('template'), "' does not support the value '").concat(chalk_1.default.red(configObj['template']), "',the value should be 'vue' or 'react' "), { title: toastTitle });
|
|
142
142
|
process.exit(1);
|
|
143
143
|
}
|
|
144
|
-
if (key === 'base' &&
|
|
145
|
-
|
|
146
|
-
tools_1.toast.error("The field '".concat(chalk_1.default.blue('npmType'), "' does not support the value '").concat(chalk_1.default.red(configObj['npmType']), "',the value should be 'npm' or 'pnpm' "), { title: toastTitle });
|
|
144
|
+
if (key === 'base' && !['npm'].includes((_b = configObj['npmType']) !== null && _b !== void 0 ? _b : exports.initConfig.npmType)) {
|
|
145
|
+
tools_1.toast.error("The field '".concat(chalk_1.default.blue('npmType'), "' does not support the value '").concat(chalk_1.default.red(configObj['npmType']), "',the value should be 'npm' "), { title: toastTitle });
|
|
147
146
|
process.exit(1);
|
|
148
147
|
}
|
|
149
148
|
if (!['hash', 'browser'].includes((_d = (_c = configObj['router']) === null || _c === void 0 ? void 0 : _c.type) !== null && _d !== void 0 ? _d : exports.initConfig.router.type)) {
|