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 +5 -7
- package/index.js +3 -3
- package/package.json +1 -1
- package/template-react/tsconfig.node.json +4 -1
- package/template-vue/tsconfig.node.json +4 -1
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
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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: '
|
|
27
|
-
defaultValue: '
|
|
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