create-lve 0.4.2 → 0.4.4

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 (3) hide show
  1. package/config.js +1 -6
  2. package/index.js +2 -12
  3. package/package.json +1 -1
package/config.js CHANGED
@@ -191,14 +191,9 @@ async function cleanupTemplate(ctx) {
191
191
  }
192
192
  }
193
193
 
194
- async function installDependencies(ctx, s) {
195
- s.stop(pc.cyan(`准备安装依赖`))
194
+ async function installDependencies(ctx) {
196
195
  try {
197
196
  await runTask(ctx.pkgManager, ['install'], ctx.targetDir)
198
-
199
- s.start(pc.green(`正在执行 ${ctx.fmtCmd} 优化代码结构`))
200
- await new Promise((r) => setTimeout(r, 300))
201
-
202
197
  const [cmd, ...args] = ctx.fmtCmd.split(' ')
203
198
  await runTask(cmd, args, ctx.targetDir)
204
199
  } catch (err) {
package/index.js CHANGED
@@ -97,8 +97,6 @@ async function main() {
97
97
  }
98
98
 
99
99
  try {
100
- s.start('Creating project')
101
-
102
100
  if (project.shouldOverwrite) await fs.emptyDir(ctx.targetDir)
103
101
  await fs.ensureDir(ctx.targetDir)
104
102
  await fs.copy(ctx.templateDir, ctx.targetDir)
@@ -106,16 +104,8 @@ async function main() {
106
104
  await applyProjectTransform(ctx)
107
105
 
108
106
  s.start('Installing dependencies')
109
- await installDependencies(ctx, s)
110
-
111
- console.log(pc.gray(`◇ Scaffolded ${ctx.name} with Vite application`))
112
- console.log(
113
- pc.gray(
114
- `• Node ${process.version.slice(1)} ${ctx.pkgManager} ${execSync(ctx.pkgManager + ' -V')
115
- .toString()
116
- .trim()}`,
117
- ),
118
- )
107
+ await installDependencies(ctx)
108
+ s.stop()
119
109
  console.log(pc.green(`→ Next: cd ${ctx.name} && ${ctx.devCmd.replace(' ', ' run ')}`))
120
110
  } catch (err) {
121
111
  s.stop(pc.red('Failed'))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-lve",
3
- "version": "0.4.2",
3
+ "version": "0.4.4",
4
4
  "bin": {
5
5
  "create-lve": "index.js"
6
6
  },