@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.
- package/package.json +1 -1
- package/src/main.js +19 -12
package/package.json
CHANGED
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
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
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
|
-
|
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
|
}
|