create-lve 0.4.9 → 0.4.11

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.
package/config.js CHANGED
@@ -127,13 +127,11 @@ export default defineConfig({
127
127
  const tsconfigPath = path.join(ctx.targetDir, 'tsconfig.node.json')
128
128
  if (fs.existsSync(tsconfigPath)) {
129
129
  try {
130
- const tsconfig = await fs.readJson(tsconfigPath)
131
- if (!tsconfig.include) {
132
- tsconfig.include = []
133
- }
134
- if (Array.isArray(tsconfig.include) && !tsconfig.include.includes('uno.config.ts')) {
135
- tsconfig.include.push('uno.config.ts')
136
- await fs.writeJson(tsconfigPath, tsconfig, { spaces: 2 })
130
+ let content = await fs.readFile(tsconfigPath, 'utf-8')
131
+
132
+ if (content.includes('/* UNO_CONFIG */')) {
133
+ content = content.replace('/* UNO_CONFIG */', ', "uno.config.ts"')
134
+ await fs.writeFile(tsconfigPath, content)
137
135
  }
138
136
  } catch {}
139
137
  }
package/index.js CHANGED
@@ -23,8 +23,8 @@ async function main() {
23
23
  path: () =>
24
24
  p.text({
25
25
  message: '项目名称',
26
- placeholder: 'vue-app',
27
- defaultValue: 'vue-app',
26
+ placeholder: 'react-app',
27
+ defaultValue: 'react-app',
28
28
  validate: (value) => {
29
29
  if (!value || value.length === 0) return
30
30
  if (value.match(/[<>:"|?*]/)) return '路径包含非法字符'
@@ -42,8 +42,8 @@ async function main() {
42
42
  p.select({
43
43
  message: '选择框架',
44
44
  options: [
45
- { value: 'vue', label: 'Vue 3', hint: '' },
46
45
  { value: 'react', label: 'React 19', hint: '' },
46
+ { value: 'vue', label: 'Vue 3', hint: '' },
47
47
  { value: 'next', label: 'Next.js 16', hint: '' },
48
48
  ],
49
49
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-lve",
3
- "version": "0.4.9",
3
+ "version": "0.4.11",
4
4
  "bin": {
5
5
  "create-lve": "index.js"
6
6
  },
@@ -22,5 +22,8 @@
22
22
  "noFallthroughCasesInSwitch": true,
23
23
  "noUncheckedSideEffectImports": true
24
24
  },
25
- "include": ["vite.config.ts"]
25
+ "include": [
26
+ "vite.config.ts"
27
+ /* UNO_CONFIG */
28
+ ]
26
29
  }
@@ -20,5 +20,8 @@
20
20
  "erasableSyntaxOnly": true,
21
21
  "noFallthroughCasesInSwitch": true
22
22
  },
23
- "include": ["vite.config.ts"]
23
+ "include": [
24
+ "vite.config.ts"
25
+ /* UNO_CONFIG */
26
+ ]
24
27
  }