@wagq/wa-cli 0.5.1 → 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 +5 -2
- package/package.json +1 -1
package/lib/init/index.js
CHANGED
|
@@ -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(),
|