@shark-pepper/create-app 1.0.3 → 1.0.4
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/README.md +31 -2
- package/package.json +1 -1
- package/templates/react-app/package.base.json +13 -5
- package/templates/react-app/pnpm-lock.yaml +730 -252
- package/templates/react-app/src/App.tsx +3 -1
- package/templates/react-app/src/components/ProtectedRoute.tsx +17 -0
- package/templates/react-app/src/index.tsx +15 -4
- package/templates/react-app/src/pages/Home.tsx +15 -0
- package/templates/react-app/src/pages/Login.tsx +29 -0
- package/templates/react-app/src/routes/index.tsx +24 -0
- package/templates/react-app/src/styles/Home.scss +9 -0
- package/templates/react-app/src/styles/Login.scss +16 -0
package/README.md
CHANGED
|
@@ -1,2 +1,31 @@
|
|
|
1
|
-
# create-app
|
|
2
|
-
|
|
1
|
+
# 🦈 @shark-pepper/create-app
|
|
2
|
+
|
|
3
|
+
> 🚀 一键创建现代化前端项目的脚手架工具。
|
|
4
|
+
> 支持 React + TypeScript + Webpack + ESLint + Prettier + Jest 等主流配置。
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## ✨ 特性
|
|
9
|
+
|
|
10
|
+
- 🧱 内置多种模板(React、Vue)
|
|
11
|
+
- ⚙️ 默认集成 ESLint、Prettier、Husky、Commitlint 等规范工具
|
|
12
|
+
- 🧪 支持 Jest 单元测试
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 📦 快速开始
|
|
17
|
+
|
|
18
|
+
### 使用 npx(推荐)
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx @shark-pepper/create-app my-project
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### 或全局安装
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install -g @shark-pepper/create-app
|
|
29
|
+
create-app my-project
|
|
30
|
+
|
|
31
|
+
```
|
package/package.json
CHANGED
|
@@ -14,28 +14,36 @@
|
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"packageManager": "pnpm@10.18.1",
|
|
16
16
|
"dependencies": {
|
|
17
|
+
"normalize.css": "^8.0.1",
|
|
17
18
|
"react": "^19.2.0",
|
|
18
|
-
"react-dom": "^19.2.0"
|
|
19
|
+
"react-dom": "^19.2.0",
|
|
20
|
+
"react-router-dom": "^7.9.5"
|
|
19
21
|
},
|
|
20
22
|
"devDependencies": {
|
|
21
23
|
"@types/react": "^19.2.2",
|
|
22
24
|
"@types/react-dom": "^19.2.2",
|
|
25
|
+
"@types/react-router-dom": "^5.3.3",
|
|
23
26
|
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
|
24
27
|
"@typescript-eslint/parser": "^8.46.2",
|
|
25
28
|
"cspell": "^9.2.2",
|
|
29
|
+
"css-loader": "^7.1.2",
|
|
26
30
|
"eslint": "^9.38.0",
|
|
31
|
+
"eslint-webpack-plugin": "^5.0.2",
|
|
32
|
+
"fork-ts-checker-webpack-plugin": "^9.1.0",
|
|
27
33
|
"html-webpack-plugin": "^5.6.4",
|
|
28
34
|
"husky": "^9.1.7",
|
|
29
35
|
"lint-staged": "^16.2.6",
|
|
36
|
+
"mini-css-extract-plugin": "^2.9.4",
|
|
37
|
+
"postcss-loader": "^8.2.0",
|
|
30
38
|
"prettier": "^3.6.2",
|
|
39
|
+
"sass": "^1.93.3",
|
|
40
|
+
"sass-loader": "^16.0.6",
|
|
41
|
+
"style-loader": "^4.0.0",
|
|
31
42
|
"ts-loader": "^9.5.4",
|
|
32
43
|
"typescript": "^5.9.3",
|
|
33
44
|
"webpack": "^5.102.1",
|
|
34
45
|
"webpack-cli": "^6.0.1",
|
|
35
|
-
"webpack-dev-server": "^5.2.2"
|
|
36
|
-
"eslint-webpack-plugin": "^5.0.2",
|
|
37
|
-
"fork-ts-checker-webpack-plugin": "^9.1.0",
|
|
38
|
-
"mini-css-extract-plugin": "^2.9.4"
|
|
46
|
+
"webpack-dev-server": "^5.2.2"
|
|
39
47
|
},
|
|
40
48
|
"lint-staged": {
|
|
41
49
|
"*.{ts,tsx,js,jsx}": [
|