create-lve 0.4.1 → 0.4.3

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 -10
  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
@@ -98,7 +98,6 @@ async function main() {
98
98
 
99
99
  try {
100
100
  s.start('Creating project')
101
- const startScaffold = Date.now()
102
101
 
103
102
  if (project.shouldOverwrite) await fs.emptyDir(ctx.targetDir)
104
103
  await fs.ensureDir(ctx.targetDir)
@@ -106,20 +105,13 @@ async function main() {
106
105
  await cleanupTemplate(ctx)
107
106
  await applyProjectTransform(ctx)
108
107
 
109
- const costScaffold = ((Date.now() - startScaffold) / 1000).toFixed(1)
110
- s.stop(pc.green(`Creating project in ${costScaffold}s`))
111
-
112
108
  s.start('Installing dependencies')
113
- const startInstall = Date.now()
114
- await installDependencies(ctx, s)
115
-
116
- const costInstall = ((Date.now() - startInstall) / 1000).toFixed(1)
117
- s.stop(pc.green(`Dependencies installed in ${costInstall}s`))
109
+ await installDependencies(ctx)
118
110
 
119
111
  console.log(pc.gray(`◇ Scaffolded ${ctx.name} with Vite application`))
120
112
  console.log(
121
113
  pc.gray(
122
- `• Node ${process.version.slice(1)} ${ctx.pkgManager} ${execSync(ctx.pkgManager + ' -v')
114
+ `• Node ${process.version.slice(1)} ${ctx.pkgManager} ${execSync(ctx.pkgManager + ' -V')
123
115
  .toString()
124
116
  .trim()}`,
125
117
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-lve",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "bin": {
5
5
  "create-lve": "index.js"
6
6
  },