create-lve 0.1.61 → 0.2.1

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
@@ -10,7 +10,13 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
10
10
 
11
11
  async function main() {
12
12
  console.clear();
13
+ const logo = `
14
+ ${pc.cyan('█ █ █ █▀▀▀')}
15
+ ${pc.cyan('█ █ █ █▀▀ ')}
16
+ ${pc.cyan('█▄▄▄ ▀▄▀ █▄▄▄')} ${pc.gray('THE ULTRA-FAST STACK')}
17
+ `;
13
18
 
19
+ p.intro(logo);
14
20
  p.intro(
15
21
  `${pc.bgCyan(pc.black(' LVE-CLI '))} ` +
16
22
  pc.gray('The Ultra-Fast React Stack (') +
@@ -72,8 +78,6 @@ async function main() {
72
78
  const renameMap = {
73
79
  '_package.json': 'package.json',
74
80
  '_gitignore': '.gitignore',
75
- '_oxfmtrc.json': '.oxfmtrc.json',
76
- '_oxlintrc.json': '.oxlintrc.json',
77
81
  '_vscode': '.vscode',
78
82
  };
79
83
 
@@ -88,6 +92,25 @@ async function main() {
88
92
  if (fs.existsSync(pkgPath)) {
89
93
  const pkg = await fs.readJson(pkgPath);
90
94
  pkg.name = path.basename(targetDir);
95
+
96
+ pkg.dependencies = {
97
+ ...pkg.dependencies,
98
+ "react": "latest",
99
+ "react-dom": "latest",
100
+ };
101
+
102
+ pkg.devDependencies = {
103
+ ...pkg.devDependencies,
104
+ "vite-plus": "latest",
105
+ "tailwindcss": "latest",
106
+ "@tailwindcss/vite": "latest",
107
+ "babel-plugin-react-compiler": "latest"
108
+ };
109
+
110
+ if (pkg.pnpm && pkg.pnpm.overrides) {
111
+ pkg.pnpm.overrides.vite = "npm:@voidzero-dev/vite-plus-core@latest";
112
+ pkg.pnpm.overrides.vitest = "npm:@voidzero-dev/vite-plus-test@latest";
113
+ }
91
114
  await fs.writeJson(pkgPath, pkg, { spaces: 2 });
92
115
  }
93
116
 
@@ -100,13 +123,13 @@ async function main() {
100
123
  const cdCmd = relativePath === '' ? '' : `cd ${relativePath}\n`;
101
124
 
102
125
  p.note(
103
- pc.cyan(`${cdCmd}pnpm install\npnpm dev`),
126
+ pc.cyan(`${cdCmd}vp install\nvp dev`),
104
127
  '快速开始指南'
105
128
  );
106
129
 
107
130
  p.outro(
108
131
  `${pc.magenta('✨ Happy Coding!')}\n` +
109
- `${pc.gray('已为你配置 OXC 规则:享受秒级校验与格式化。')}`
132
+ `${pc.gray(' ==== VitePlus + OXC + React ====')}`
110
133
  );
111
134
 
112
135
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-lve",
3
- "version": "0.1.61",
3
+ "version": "0.2.1",
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,16 @@
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"
26
+ "vite": "npm:@voidzero-dev/vite-plus-core@latest",
27
+ "vite-plus": "latest"
28
+ },
29
+ "packageManager": "pnpm@10.32.1",
30
+ "pnpm": {
31
+ "overrides": {
32
+ "vite": "npm:@voidzero-dev/vite-plus-core@latest",
33
+ "vitest": "npm:@voidzero-dev/vite-plus-test@latest"
34
+ }
31
35
  }
32
36
  }
@@ -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
- }