create-vite-react-cli 0.1.0 → 0.4.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/LICENSE +21 -21
- package/README.md +28 -83
- package/bundle.js +2013 -0
- package/locales/en-US.json +42 -0
- package/locales/zh-Hans.json +42 -0
- package/package.json +61 -19
- package/templates/base/_gitignore +25 -0
- package/templates/base/_vscode/extensions.json +3 -0
- package/templates/base/_vscode/settings.json +4 -0
- package/templates/base/package.json +16 -0
- package/templates/{public → base/public}/vite.svg +1 -2
- package/templates/{vite.config.js → base/vite.config.js} +7 -8
- package/templates/{src → code/default/src}/App.css +42 -43
- package/templates/code/default/src/App.jsx +31 -0
- package/templates/code/default/src/assets/react.svg +1 -0
- package/templates/{src → code/default/src}/index.css +68 -69
- package/templates/code/typescript-/src/App.css +42 -0
- package/templates/code/typescript-/src/App.tsx +31 -0
- package/templates/code/typescript-/src/assets/react.svg +1 -0
- package/templates/code/typescript-/src/index.css +68 -0
- package/templates/config/typescript/package.json +7 -0
- package/templates/{index.html → entry/default/index.html.ejs} +13 -14
- package/templates/entry/default/src/main.jsx +10 -0
- package/templates/entry/default/src/main.tsx +10 -0
- package/templates/formatting/prettier/_prettierrc +7 -0
- package/templates/formatting/prettier/package.json +9 -0
- package/templates/linting/base/package.json +12 -0
- package/templates/linting/core/js/eslint.config.js +24 -0
- package/templates/linting/core/ts/eslint.config.js +25 -0
- package/templates/linting/core/ts/package.json +5 -0
- package/templates/linting/prettier/eslint.config.js +3 -0
- package/templates/tsconfig/base/tsconfig.app.json +25 -0
- package/templates/tsconfig/base/tsconfig.node.json +23 -0
- package/bin/cli.js +0 -16
- package/src/index.js +0 -86
- package/templates/README.md +0 -35
- package/templates/package.json +0 -22
- package/templates/public/react.svg +0 -2
- package/templates/src/App.jsx +0 -34
- package/templates/src/main.jsx +0 -11
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c)
|
|
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,28 @@
|
|
|
1
|
-
# create-vite-react-cli
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
###
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
+
```
|