@htyf-mp/cli 0.0.10 → 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 +16 -9
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -141,22 +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', `${
|
|
151
|
+
appRootPath = taro_path
|
|
152
|
+
await execa('rm', ['-r', `${expo_path}`])
|
|
153
|
+
await execa('rm', ['-r', `${game_path}`])
|
|
148
154
|
}
|
|
149
155
|
if (tempType === 'expo') {
|
|
150
|
-
appRootPath =
|
|
151
|
-
await execa('rm', ['-r', `${
|
|
156
|
+
appRootPath = expo_path
|
|
157
|
+
await execa('rm', ['-r', `${taro_path}`])
|
|
158
|
+
await execa('rm', ['-r', `${game_path}`])
|
|
152
159
|
}
|
|
153
160
|
if (tempType === 'game-cocos') {
|
|
154
|
-
appRootPath =
|
|
155
|
-
await execa('rm', ['-r', `${
|
|
156
|
-
await execa('rm', ['-r', `${
|
|
161
|
+
appRootPath = game_path
|
|
162
|
+
await execa('rm', ['-r', `${expo_path}`])
|
|
163
|
+
await execa('rm', ['-r', `${taro_path}`])
|
|
157
164
|
}
|
|
158
|
-
await execa('rm', ['-r', `${
|
|
159
|
-
await execa('rm', ['-rf', `${
|
|
165
|
+
await execa('rm', ['-r', `${cli_path}`])
|
|
166
|
+
await execa('rm', ['-rf', `${git_path}`])
|
|
160
167
|
} catch (err) {}
|
|
161
168
|
const __TEMP_PATH__ = path.join(appRootPath, '__TEMP__');
|
|
162
169
|
const pkg_path = path.join(appRootPath, './package.json');
|