create-lve 0.3.8 → 0.3.10

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/index.js +17 -14
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -29,32 +29,35 @@ async function main() {
29
29
  if (value.match(/[<>:"|?*]/)) return '路径包含非法字符'
30
30
  },
31
31
  }),
32
+
32
33
  shouldOverwrite: ({ results }) => {
33
34
  const targetDir = path.resolve(process.cwd(), results.path)
34
35
  if (fs.existsSync(targetDir) && fs.readdirSync(targetDir).length > 0) {
35
36
  return p.confirm({ message: `目录已存在,是否清空?`, initialValue: false })
36
37
  }
37
38
  },
39
+
38
40
  framework: () =>
39
41
  p.select({
40
42
  message: '选择框架',
41
- defaultValue: 'react',
42
43
  options: [
43
- { value: 'react', label: 'React 19', hint: 'VitePlus + Compiler' },
44
- { value: 'vue', label: 'Vue 3', hint: 'VitePlus + Optimized' },
45
- { value: 'next', label: 'Next.js 16', hint: 'React 19 + Tailwind v4 + Shadcn UI' },
44
+ { value: 'react', label: 'React 19', hint: '' },
45
+ { value: 'vue', label: 'Vue 3', hint: '' },
46
+ { value: 'next', label: 'Next.js 16', hint: '' },
46
47
  ],
47
48
  }),
48
- cssEngine: ({ results }) => {
49
- if (results.framework === 'next') return
50
- return p.select({
51
- message: '选择 CSS',
52
- options: [
53
- { value: 'tailwind', label: 'Tailwind v4', hint: '🛡️ 装甲级稳定' },
54
- { value: 'unocss', label: 'UnoCSS', hint: '⚡️ 战机级性能' },
55
- ],
56
- })
57
- },
49
+
50
+ cssEngine: ({ results }) =>
51
+ results.framework === 'next'
52
+ ? p.note('Next.js 已内置 Tailwind,无需选择')
53
+ : p.select({
54
+ message: '选择 CSS',
55
+ options: [
56
+ { value: 'tailwind', label: 'Tailwind v4' },
57
+ { value: 'unocss', label: 'UnoCSS' },
58
+ ],
59
+ }),
60
+
58
61
  install: () => p.confirm({ message: '是否现在自动安装依赖?', initialValue: true }),
59
62
  },
60
63
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-lve",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
4
4
  "bin": {
5
5
  "create-lve": "index.js"
6
6
  },