@htyf-mp/cli 0.0.3 → 0.0.5
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/README.md +1 -1
- package/cli.js +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ npx @htyf-mp/cli
|
|
|
14
14
|
|
|
15
15
|
### 运行应用程序
|
|
16
16
|
|
|
17
|
-
进入`mini-apps-template-
|
|
17
|
+
进入`mini-apps-template-expo`或`mini-apps-template-taro`或`mini-game-template-cocos`目录并运行:
|
|
18
18
|
> 具体模板使用,可参考模板内的README.md
|
|
19
19
|
```sh
|
|
20
20
|
npm start
|
package/cli.js
CHANGED
|
@@ -25,7 +25,7 @@ const green = chalk.green
|
|
|
25
25
|
const repoUrl = 'https://github.com/htyf-mp-community/htyf-mp.git'
|
|
26
26
|
|
|
27
27
|
const taroTempPath = 'mini-apps-template-taro';
|
|
28
|
-
const
|
|
28
|
+
const expoTempPath = 'mini-apps-template-expo';
|
|
29
29
|
const gameTempPath = 'mini-game-template-cocos';
|
|
30
30
|
|
|
31
31
|
const isYarnInstalled = () => {
|
|
@@ -95,12 +95,12 @@ async function main() {
|
|
|
95
95
|
message: '请选择模板类型?',
|
|
96
96
|
choices: [
|
|
97
97
|
{
|
|
98
|
-
name: '
|
|
99
|
-
value: '
|
|
98
|
+
name: 'Expo (https://expo.dev/)',
|
|
99
|
+
value: 'expo',
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
|
-
name: '
|
|
103
|
-
value: '
|
|
102
|
+
name: 'Taro (https://docs.taro.zone/)',
|
|
103
|
+
value: 'taro',
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
name: 'Game',
|
|
@@ -128,17 +128,17 @@ async function main() {
|
|
|
128
128
|
try {
|
|
129
129
|
if (tempType === 'taro') {
|
|
130
130
|
appRootPath = `${appName}/${taroTempPath}`
|
|
131
|
-
await execa('rm', ['-r', `${appName}/${
|
|
131
|
+
await execa('rm', ['-r', `${appName}/${expoTempPath}`])
|
|
132
132
|
await execa('rm', ['-r', `${appName}/${gameTempPath}`])
|
|
133
133
|
}
|
|
134
|
-
if (tempType === '
|
|
135
|
-
appRootPath = `${appName}/${
|
|
134
|
+
if (tempType === 'expo') {
|
|
135
|
+
appRootPath = `${appName}/${expoTempPath}`
|
|
136
136
|
await execa('rm', ['-r', `${appName}/${taroTempPath}`])
|
|
137
137
|
await execa('rm', ['-r', `${appName}/${gameTempPath}`])
|
|
138
138
|
}
|
|
139
139
|
if (tempType === 'game-cocos') {
|
|
140
140
|
appRootPath = `${appName}/${gameTempPath}`
|
|
141
|
-
await execa('rm', ['-r', `${appName}/${
|
|
141
|
+
await execa('rm', ['-r', `${appName}/${expoTempPath}`])
|
|
142
142
|
await execa('rm', ['-r', `${appName}/${taroTempPath}`])
|
|
143
143
|
}
|
|
144
144
|
await execa('rm', ['-r', `${appName}/cli`])
|