create-lve 0.1.6 → 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 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}pnpm install\npnpm dev`),
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('已为你配置 OXC 规则:享受秒级校验与格式化。')}`
113
+ `${pc.gray(' ==== VitePlus + OXC + React ====')}`
110
114
  );
111
115
 
112
116
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-lve",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create-lve": "index.js"
@@ -4,19 +4,16 @@
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
7
- "dev": "vite",
8
- "build": "tsc -b && vite build",
9
- "build-only": "vite build",
10
- "preview": "vite preview",
11
- "lint": "oxlint",
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.0",
19
- "react-dom": "^19.2.0",
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
- "oxfmt": "^0.36.0",
28
- "oxlint": "^1.52.0",
24
+ "babel-plugin-react-compiler": "latest",
29
25
  "typescript": "~5.9.3",
30
- "vite": "^8.0.0-beta.18"
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
+ }
@@ -1,8 +1,22 @@
1
- import { defineConfig } from 'vite'
2
- import react from '@vitejs/plugin-react'
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
- plugins: [react(), tailwindcss()],
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
+ });
@@ -1,9 +0,0 @@
1
- {
2
- "$schema": "./node_modules/oxfmt/configuration_schema.json",
3
- "semi": false,
4
- "singleQuote": true,
5
- "bracketSpacing": true,
6
- "tabWidth": 2,
7
- "useTabs": false,
8
- "ignorePatterns": ["node_modules/**", "dist/**", "public/**", "*.min.js"]
9
- }
@@ -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
- }