@gx-design-vue/create-gx-cli 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/main.js +19 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gx-design-vue/create-gx-cli",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "license": "MIT",
5
5
  "description": "a cli to bootstrap gx project",
6
6
  "main": "src/index.js",
package/src/main.js CHANGED
@@ -150,17 +150,19 @@ export async function createProject(options) {
150
150
  download(downloadGit.url, root, options.projectName)
151
151
  }
152
152
  } else {
153
- const tasks = new Listr(
154
- [
155
- {
156
- title: '项目创建',
157
- task: () => copyTemplateFiles(templateDir, root)
158
- },
159
- options.template !== 'mobile-vant-html' ? {
160
- title: '初始化项目',
161
- task: () => editPackageJson(root, options.projectName || getProjectName(options.projectName))
162
- } : {}
163
- ],
153
+ const listr = [
154
+ {
155
+ title: '项目创建',
156
+ task: () => copyTemplateFiles(templateDir, root)
157
+ },
158
+ ]
159
+ if (options.template !== 'mobile-vant-html') {
160
+ listr.push({
161
+ title: '初始化项目',
162
+ task: () => editPackageJson(root, options.projectName || getProjectName(options.projectName))
163
+ })
164
+ }
165
+ const tasks = new Listr(listr,
164
166
  {
165
167
  exitOnError: false
166
168
  }
@@ -168,7 +170,12 @@ export async function createProject(options) {
168
170
 
169
171
  await tasks.run()
170
172
 
171
- doneLog(cwd, root)
173
+ if (options.template !== 'mobile-vant-html') {
174
+ doneLog(cwd, root)
175
+ } else {
176
+ console.log(chalk.blueBright(`init success`))
177
+
178
+ }
172
179
  }
173
180
  return true
174
181
  }