@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.
Files changed (2) hide show
  1. package/cli.js +16 -9
  2. 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 = `${appName}/${taroTempPath}`
147
- await execa('rm', ['-r', `${appName}/${gameTempPath}`])
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 = `${appName}/${expoTempPath}`
151
- await execa('rm', ['-r', `${appName}/${gameTempPath}`])
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 = `${appName}/${gameTempPath}`
155
- await execa('rm', ['-r', `${appName}/${expoTempPath}`])
156
- await execa('rm', ['-r', `${appName}/${taroTempPath}`])
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', `${appName}/cli`])
159
- await execa('rm', ['-rf', `${appName}/.git`])
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');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htyf-mp/cli",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "红糖云服app小程序模板-cli",
5
5
  "type": "module",
6
6
  "bin": "cli.js",