@htyf-mp/cli 0.0.9 → 0.0.11
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/cli.js +17 -12
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -119,7 +119,7 @@ async function main() {
|
|
|
119
119
|
value: repoUrl,
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
|
-
name: '
|
|
122
|
+
name: 'coding(最快)',
|
|
123
123
|
value: codingRepoUrl,
|
|
124
124
|
},
|
|
125
125
|
]
|
|
@@ -141,24 +141,29 @@ async function main() {
|
|
|
141
141
|
spinner.start()
|
|
142
142
|
await execa('git', ['clone', repoType, appName])
|
|
143
143
|
let appRootPath = '';
|
|
144
|
+
const taro_path = path.join('./', `${appName}`, `${taroTempPath}`)
|
|
145
|
+
const expo_path = path.join('./', `${appName}`, `${expoTempPath}`)
|
|
146
|
+
const game_path = path.join('./', `${appName}`, `${gameTempPath}`)
|
|
147
|
+
const cli_path = path.join('./', `${appName}`, `cli`)
|
|
148
|
+
const git_path = path.join('./', `${appName}`, `.git`)
|
|
144
149
|
try {
|
|
145
150
|
if (tempType === 'taro') {
|
|
146
|
-
appRootPath =
|
|
147
|
-
await execa('rm', ['-r', `${
|
|
148
|
-
await execa('rm', ['-r', `${
|
|
151
|
+
appRootPath = taro_path
|
|
152
|
+
await execa('rm', ['-r', `${expo_path}`])
|
|
153
|
+
await execa('rm', ['-r', `${game_path}`])
|
|
149
154
|
}
|
|
150
155
|
if (tempType === 'expo') {
|
|
151
|
-
appRootPath =
|
|
152
|
-
await execa('rm', ['-r', `${
|
|
153
|
-
await execa('rm', ['-r', `${
|
|
156
|
+
appRootPath = expo_path
|
|
157
|
+
await execa('rm', ['-r', `${taro_path}`])
|
|
158
|
+
await execa('rm', ['-r', `${game_path}`])
|
|
154
159
|
}
|
|
155
160
|
if (tempType === 'game-cocos') {
|
|
156
|
-
appRootPath =
|
|
157
|
-
await execa('rm', ['-r', `${
|
|
158
|
-
await execa('rm', ['-r', `${
|
|
161
|
+
appRootPath = game_path
|
|
162
|
+
await execa('rm', ['-r', `${expo_path}`])
|
|
163
|
+
await execa('rm', ['-r', `${taro_path}`])
|
|
159
164
|
}
|
|
160
|
-
await execa('rm', ['-r', `${
|
|
161
|
-
await execa('rm', ['-rf', `${
|
|
165
|
+
await execa('rm', ['-r', `${cli_path}`])
|
|
166
|
+
await execa('rm', ['-rf', `${git_path}`])
|
|
162
167
|
} catch (err) {}
|
|
163
168
|
const __TEMP_PATH__ = path.join(appRootPath, '__TEMP__');
|
|
164
169
|
const pkg_path = path.join(appRootPath, './package.json');
|