create-vite-react-cli 0.1.0 → 0.4.2

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.
Files changed (41) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +47 -83
  3. package/dist/index.mjs +2569 -0
  4. package/index.js +3 -0
  5. package/locales/en-US.json +42 -0
  6. package/locales/zh-Hans.json +42 -0
  7. package/package.json +68 -34
  8. package/templates/base/_gitignore +25 -0
  9. package/templates/base/_vscode/extensions.json +3 -0
  10. package/templates/base/_vscode/settings.json +4 -0
  11. package/templates/base/package.json +16 -0
  12. package/templates/{public → base/public}/vite.svg +1 -2
  13. package/templates/{vite.config.js → base/vite.config.js} +7 -8
  14. package/templates/{src → code/default/src}/App.css +42 -43
  15. package/templates/code/default/src/App.jsx +31 -0
  16. package/templates/code/default/src/assets/react.svg +1 -0
  17. package/templates/{src → code/default/src}/index.css +68 -69
  18. package/templates/code/typescript-/src/App.css +42 -0
  19. package/templates/code/typescript-/src/App.tsx +31 -0
  20. package/templates/code/typescript-/src/assets/react.svg +1 -0
  21. package/templates/code/typescript-/src/index.css +68 -0
  22. package/templates/config/typescript/package.json +7 -0
  23. package/templates/{index.html → entry/default/index.html.ejs} +13 -14
  24. package/templates/entry/default/src/main.jsx +10 -0
  25. package/templates/entry/default/src/main.tsx +10 -0
  26. package/templates/formatting/prettier/_prettierrc +7 -0
  27. package/templates/formatting/prettier/package.json +9 -0
  28. package/templates/linting/base/package.json +12 -0
  29. package/templates/linting/core/js/eslint.config.js +24 -0
  30. package/templates/linting/core/ts/eslint.config.js +25 -0
  31. package/templates/linting/core/ts/package.json +5 -0
  32. package/templates/linting/prettier/eslint.config.js +3 -0
  33. package/templates/tsconfig/base/tsconfig.app.json +25 -0
  34. package/templates/tsconfig/base/tsconfig.node.json +23 -0
  35. package/bin/cli.js +0 -16
  36. package/src/index.js +0 -86
  37. package/templates/README.md +0 -35
  38. package/templates/package.json +0 -22
  39. package/templates/public/react.svg +0 -2
  40. package/templates/src/App.jsx +0 -34
  41. package/templates/src/main.jsx +0 -11
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Pan Min
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Miles Pan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,83 +1,47 @@
1
- # create-vite-react-cli
2
-
3
- 一个快速创建基于 Vite React 项目的脚手架工具。
4
-
5
- ## 功能特性
6
-
7
- - ⚡️ 基于 Vite,极速启动
8
- - ⚛️ 使用 React 18
9
- - 🎨 开箱即用的项目模板
10
- - 📦 自动配置 TypeScript 类型支持
11
- - 🚀 现代化的开发体验
12
-
13
- ## 使用方法
14
-
15
- ### 推荐方式(最简单)
16
-
17
- ```bash
18
- npm create vite-react-cli my-app
19
- ```
20
-
21
- 这是最推荐的使用方式,npm 会自动下载并执行最新版本的脚手架工具。
22
-
23
- ### 其他使用方式
24
-
25
- #### 使用 npx
26
-
27
- ```bash
28
- npx create-vite-react-cli my-app
29
- ```
30
-
31
- #### 全局安装后使用
32
-
33
- ```bash
34
- npm install -g create-vite-react-cli
35
- create-vite-react-cli my-app
36
- ```
37
-
38
- ### 交互式创建
39
-
40
- 如果不提供项目名称,工具会提示您输入:
41
-
42
- ```bash
43
- npm create vite-react-cli
44
- ```
45
-
46
- ## 创建后的步骤
47
-
48
- 1. 进入项目目录:
49
-
50
- ```bash
51
- cd my-app
52
- ```
53
-
54
- 2. 安装依赖:
55
-
56
- ```bash
57
- npm install
58
- ```
59
-
60
- 3. 启动开发服务器:
61
-
62
- ```bash
63
- npm run dev
64
- ```
65
-
66
- 4. 构建生产版本:
67
-
68
- ```bash
69
- npm run build
70
- ```
71
-
72
- 5. 预览生产构建:
73
- ```bash
74
- npm run preview
75
- ```
76
-
77
- ## 许可证
78
-
79
- MIT
80
-
81
- ## 作者
82
-
83
- Pan Min
1
+ # create-vite-react-cli <a href="https://npmjs.com/package/create-vite-react-cli"><img src="https://img.shields.io/npm/dw/create-vite-react-cli" alt="npm package"></a> <a href="https://nodejs.org/en/about/previous-releases"><img src="https://img.shields.io/node/v/create-vite-react-cli" alt="node compatibility"></a>
2
+
3
+ The recommended way to start a Vite-powered React project
4
+
5
+ ## Usage
6
+
7
+ ### Recommended Method (Simplest)
8
+
9
+ ```bash
10
+ npm create vite-react-cli@latest
11
+ ```
12
+
13
+ This is the recommended way to use the tool. npm will automatically download and execute the latest version of the CLI.
14
+
15
+ ### Other Methods
16
+
17
+ #### Using npx
18
+
19
+ ```bash
20
+ npx create-vite-react-cli@latest
21
+ ```
22
+
23
+ #### Using a Global Installation
24
+
25
+ ```bash
26
+ npm install -g create-vite-react-cli
27
+ create-vite-react-cli my-app
28
+ ```
29
+
30
+ ## Command Line Options
31
+
32
+ ### Arguments
33
+
34
+ - `[DIRECTORY]`: The name of the project directory (optional).
35
+
36
+ ### Options
37
+
38
+ - `--force`: Overwrite target directory if it exists.
39
+ - `--help`: Display help message.
40
+ - `--version`: Display version number.
41
+
42
+ ### Feature Flags
43
+
44
+ - `--default`: Use default configuration without additional features.
45
+ - `--ts`, `--typescript`: Add TypeScript support.
46
+ - `--eslint`: Add ESLint for code quality.
47
+ - `--prettier`: Add Prettier for code formatting.