@htyf-mp/cli 0.0.7 → 0.0.8

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 -1
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -24,6 +24,7 @@ const program = new Command()
24
24
  const green = chalk.green
25
25
 
26
26
  const repoUrl = 'https://github.com/htyf-mp-community/htyf-mp.git'
27
+ const codingRepoUrl = 'https://e.coding.net/dagouzhi/hongtangyun_mobile/htyf-mp.git'
27
28
 
28
29
  const taroTempPath = 'mini-apps-template';
29
30
  const expoTempPath = 'mini-apps-template';
@@ -110,6 +111,20 @@ async function main() {
110
111
  ]
111
112
  })
112
113
 
114
+ const repoType = await select({
115
+ message: '请选择模板镜像?',
116
+ choices: [
117
+ {
118
+ name: 'github(最新)',
119
+ value: repoUrl,
120
+ },
121
+ {
122
+ name: 'github(最快)',
123
+ value: codingRepoUrl,
124
+ },
125
+ ]
126
+ })
127
+
113
128
  const appid = md5(uuidv4(v4options));
114
129
 
115
130
  let config = {
@@ -124,7 +139,7 @@ async function main() {
124
139
  log(`\n初始化项目. \n`)
125
140
 
126
141
  spinner.start()
127
- await execa('git', ['clone', repoUrl, appName])
142
+ await execa('git', ['clone', repoType, appName])
128
143
  let appRootPath = '';
129
144
  try {
130
145
  if (tempType === 'taro') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htyf-mp/cli",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "description": "红糖云服app小程序模板-cli",
5
5
  "type": "module",
6
6
  "bin": "cli.js",