create-lve 0.1.61 → 0.2.0
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/index.js +8 -4
- package/package.json +1 -1
- package/template/_package.json +16 -13
- package/template/vite.config.ts +18 -4
- package/template/_oxfmtrc.json +0 -9
- package/template/_oxlintrc.json +0 -15
package/index.js
CHANGED
|
@@ -72,8 +72,6 @@ async function main() {
|
|
|
72
72
|
const renameMap = {
|
|
73
73
|
'_package.json': 'package.json',
|
|
74
74
|
'_gitignore': '.gitignore',
|
|
75
|
-
'_oxfmtrc.json': '.oxfmtrc.json',
|
|
76
|
-
'_oxlintrc.json': '.oxlintrc.json',
|
|
77
75
|
'_vscode': '.vscode',
|
|
78
76
|
};
|
|
79
77
|
|
|
@@ -88,6 +86,12 @@ async function main() {
|
|
|
88
86
|
if (fs.existsSync(pkgPath)) {
|
|
89
87
|
const pkg = await fs.readJson(pkgPath);
|
|
90
88
|
pkg.name = path.basename(targetDir);
|
|
89
|
+
pkg.devDependencies = {
|
|
90
|
+
...pkg.devDependencies,
|
|
91
|
+
"vite-plus": "latest",
|
|
92
|
+
"tailwindcss": "latest",
|
|
93
|
+
"@tailwindcss/vite": "latest"
|
|
94
|
+
};
|
|
91
95
|
await fs.writeJson(pkgPath, pkg, { spaces: 2 });
|
|
92
96
|
}
|
|
93
97
|
|
|
@@ -100,13 +104,13 @@ async function main() {
|
|
|
100
104
|
const cdCmd = relativePath === '' ? '' : `cd ${relativePath}\n`;
|
|
101
105
|
|
|
102
106
|
p.note(
|
|
103
|
-
pc.cyan(`${cdCmd}
|
|
107
|
+
pc.cyan(`${cdCmd}vp install\nvp dev`),
|
|
104
108
|
'快速开始指南'
|
|
105
109
|
);
|
|
106
110
|
|
|
107
111
|
p.outro(
|
|
108
112
|
`${pc.magenta('✨ Happy Coding!')}\n` +
|
|
109
|
-
`${pc.gray('
|
|
113
|
+
`${pc.gray(' ==== VitePlus + OXC + React ====')}`
|
|
110
114
|
);
|
|
111
115
|
|
|
112
116
|
} catch (err) {
|
package/package.json
CHANGED
package/template/_package.json
CHANGED
|
@@ -4,19 +4,16 @@
|
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"dev": "
|
|
8
|
-
"build": "tsc -b &&
|
|
9
|
-
"
|
|
10
|
-
"preview": "
|
|
11
|
-
"
|
|
12
|
-
"lint:fix": "oxlint --fix",
|
|
13
|
-
"format": "oxfmt .",
|
|
14
|
-
"format:check": "oxfmt --check"
|
|
7
|
+
"dev": "vp dev",
|
|
8
|
+
"build": "tsc -b && vp build",
|
|
9
|
+
"lint": "eslint .",
|
|
10
|
+
"preview": "vp preview",
|
|
11
|
+
"prepare": "vp config"
|
|
15
12
|
},
|
|
16
13
|
"dependencies": {
|
|
17
14
|
"@tailwindcss/vite": "^4.2.1",
|
|
18
|
-
"react": "^19.2.
|
|
19
|
-
"react-dom": "^19.2.
|
|
15
|
+
"react": "^19.2.4",
|
|
16
|
+
"react-dom": "^19.2.4",
|
|
20
17
|
"tailwindcss": "^4.2.1"
|
|
21
18
|
},
|
|
22
19
|
"devDependencies": {
|
|
@@ -24,9 +21,15 @@
|
|
|
24
21
|
"@types/react": "^19.2.7",
|
|
25
22
|
"@types/react-dom": "^19.2.3",
|
|
26
23
|
"@vitejs/plugin-react": "^5.1.1",
|
|
27
|
-
"
|
|
28
|
-
"oxlint": "^1.52.0",
|
|
24
|
+
"babel-plugin-react-compiler": "latest",
|
|
29
25
|
"typescript": "~5.9.3",
|
|
30
|
-
"vite": "
|
|
26
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
|
|
27
|
+
"vite-plus": "latest"
|
|
28
|
+
},
|
|
29
|
+
"pnpm": {
|
|
30
|
+
"overrides": {
|
|
31
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
|
|
32
|
+
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
|
|
33
|
+
}
|
|
31
34
|
}
|
|
32
35
|
}
|
package/template/vite.config.ts
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
import { defineConfig } from
|
|
2
|
-
import react from
|
|
1
|
+
import { defineConfig } from "vite-plus"
|
|
2
|
+
import react from "@vitejs/plugin-react"
|
|
3
3
|
import tailwindcss from '@tailwindcss/vite'
|
|
4
4
|
|
|
5
5
|
// https://vite.dev/config/
|
|
6
6
|
export default defineConfig({
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
fmt: { semi: false, singleQuote: true},
|
|
8
|
+
staged: {
|
|
9
|
+
"*": "vp check --fix",
|
|
10
|
+
},
|
|
11
|
+
lint: { options: { typeAware: true, typeCheck: true } },
|
|
12
|
+
plugins: [
|
|
13
|
+
react({
|
|
14
|
+
babel: {
|
|
15
|
+
plugins: [
|
|
16
|
+
["babel-plugin-react-compiler", { target: "19" }]
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
} as any),
|
|
20
|
+
tailwindcss()
|
|
21
|
+
],
|
|
22
|
+
});
|
package/template/_oxfmtrc.json
DELETED
package/template/_oxlintrc.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
-
"categories": {
|
|
4
|
-
"correctness": "warn",
|
|
5
|
-
"perf": "warn",
|
|
6
|
-
"suspicious": "warn",
|
|
7
|
-
"pedantic": "allow"
|
|
8
|
-
},
|
|
9
|
-
"rules": {
|
|
10
|
-
"eslint/no-unused-vars": "error",
|
|
11
|
-
"react/jsx-no-target-blank": "error",
|
|
12
|
-
"react-hooks/rules-of-hooks": "error"
|
|
13
|
-
},
|
|
14
|
-
"ignorePatterns": ["dist/**", "coverage/**", "vendor/**", "test/snapshots/**"]
|
|
15
|
-
}
|