@wagq/wa-cli 0.5.0 → 0.5.2
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/lib/init/index.js +6 -3
- package/package.json +1 -1
package/lib/init/index.js
CHANGED
|
@@ -7,7 +7,7 @@ const after = require("./after.js");
|
|
|
7
7
|
const { execSync } = require("child_process");
|
|
8
8
|
|
|
9
9
|
const viteBin = "npm create vite@latest";
|
|
10
|
-
const uniAppBin = "npm create
|
|
10
|
+
const uniAppBin = "npm create unibest";
|
|
11
11
|
|
|
12
12
|
const urls = {
|
|
13
13
|
vue单页面后台: { remote: "sdmu-gaoqi/vite-vue" },
|
|
@@ -39,11 +39,14 @@ const init = async () => {
|
|
|
39
39
|
const { name, selectMode } = await Prompt.default.prompt(initQuestions());
|
|
40
40
|
if (name) {
|
|
41
41
|
const { remote, bin } = urls?.[selectMode];
|
|
42
|
-
await check(name);
|
|
43
42
|
|
|
44
43
|
const initByVite = bin === viteBin;
|
|
45
44
|
const initByUniApp = bin === uniAppBin;
|
|
46
45
|
|
|
46
|
+
if (!initByUniApp) {
|
|
47
|
+
await check(name);
|
|
48
|
+
}
|
|
49
|
+
|
|
47
50
|
if (initByVite) {
|
|
48
51
|
log.info("准备从vite创建");
|
|
49
52
|
execSync(`${bin} ${name}`, {
|
|
@@ -52,7 +55,7 @@ const init = async () => {
|
|
|
52
55
|
shell: true,
|
|
53
56
|
});
|
|
54
57
|
} else if (initByUniApp) {
|
|
55
|
-
log.info("准备从
|
|
58
|
+
log.info("准备从unibest创建");
|
|
56
59
|
execSync(bin, {
|
|
57
60
|
stdio: "inherit",
|
|
58
61
|
cwd: process.cwd(),
|