@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.
Files changed (2) hide show
  1. package/cli.js +17 -12
  2. 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: 'github(最快)',
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 = `${appName}/${taroTempPath}`
147
- await execa('rm', ['-r', `${appName}/${expoTempPath}`])
148
- await execa('rm', ['-r', `${appName}/${gameTempPath}`])
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 = `${appName}/${expoTempPath}`
152
- await execa('rm', ['-r', `${appName}/${taroTempPath}`])
153
- await execa('rm', ['-r', `${appName}/${gameTempPath}`])
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 = `${appName}/${gameTempPath}`
157
- await execa('rm', ['-r', `${appName}/${expoTempPath}`])
158
- await execa('rm', ['-r', `${appName}/${taroTempPath}`])
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', `${appName}/cli`])
161
- await execa('rm', ['-rf', `${appName}/.git`])
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');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htyf-mp/cli",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "红糖云服app小程序模板-cli",
5
5
  "type": "module",
6
6
  "bin": "cli.js",