提交 e0d421d1 作者: ZhangLingKun

功能:readme.md

上级 447ee93a
<h1 align='center'>Vite + React + TypeScript + Eslint + Prettier Template ⚡</h1> # 项目描述
Create a new project with Vite, React JS, TypeScript, Eslint, Prettier in just 1 second and you don't need to setup anything. * **项目名称:** 云享飞官网 && 四端小程序融合 网页端
* **技术栈:** [React 18](https://zh-hans.reactjs.org/docs/getting-started.html) + Hook + TS + Eslint + Prettier + [Antd v5](https://ant.design/components/overview-cn)
#### **Vercel Deploy: https://vite-react-ts-eslint-prettier.vercel.app**
- [【gitlab仓库】mmc-store](http://git.mmcuav.cn/root/mmc-store.git)
![image](https://user-images.githubusercontent.com/70432453/170648662-2ff424b9-74e9-4754-a04d-512fe1496a3b.png)
## 文档
## **Some Features 📋**
- [Antd 组件库](https://ant.design/components/overview-cn)
Alias Import - [React 18 中文文档](https://zh-hans.reactjs.org/docs/getting-started.html)
- [TypeScript 中文文档](https://www.tslang.cn/docs/home.html)
![image](https://user-images.githubusercontent.com/70432453/170644457-ede03cca-44e9-4543-94d3-412c9d317063.png) - [ESLint + Prettier 配置教程](https://juejin.cn/post/7125207251144409124)
- [vue3+ts+vite项目中使用eslint+prettier指南](https://juejin.cn/post/7118294114734440455)
Hook Warning - [Vite+Vue 3+TS 配置记录](https://juejin.cn/post/7163662410312581150)
![image](https://user-images.githubusercontent.com/70432453/170638708-23a20ffd-156e-494a-84be-b1e1cfdb5c93.png)
## 项目部署
Prettier Warning
* yarn
![image](https://user-images.githubusercontent.com/70432453/170639043-24423ed1-73cc-4730-b270-2acea1ae0c74.png) `yarn ` 安装依赖
`yarn dev` 启动本地服务
Etc... `yarn dev:xx` 启动基于配置文件的本地服务
`yarn build` 构建生产包
## **Using 📦** `yarn build:xx` 构建基于配置文件的生产包
`yarn lint:fix` eslint全局格式化
1. Clone Template * npm & pnpm
`npm i` 安装依赖
``` `npm run dev` 启动本地服务
git clone https://github.com/igdev116/vite-react-ts-eslint-prettier.git `npm run dev:xx` 启动基于配置文件的本地服务
``` `npm run build` 构建生产包
`npm run build:xx` 构建基于配置文件的生产包
2. Install Packages `npm run lint:fix` eslint全局格式化
```
yarn install ## 项目结构
``` ```
mmc-store
3. Start Project ├── public
└── src
``` ├── api 接口请求
yarn dev │ └── modules
``` ├── assets 静态文件
│ ├── css
4. If you using git, delete the existing folder .git after cloning (open `git bash` or other terminal) │ └── images
├── common 公共方法
``` │ ├── hook 自定义hook
rm -rf .git │ └── interface 类型接口
``` ├── components 自定义组件
│ ├── layout
## **Options ✍️** │ ├── uploader 上传组件封装
│ └── brandSelectSearch 筛选组件封装
1. Check lint ├── events eventBus
├── pages
``` │ ├── commom 通用页面(404、登录等)
yarn lint │ └── systemSetting 系统管理
``` ├── routes 路由
├── store redux
2. Fix lint │ ├── hook
│ └── slice
``` └── utils 工具文件
yarn lint:fix ```
``` ## vscode / webstorm 配置项
3. Check prettier * **vscode配置项:**[给 VSCode、Git Hook 配置 ESLint + Prettier 自动格式化](https://zhuanlan.zhihu.com/p/444925446)
* **webstorm 配置项:**[webstorm中vue配置eslint代码格式化](https://juejin.cn/post/7086697887349882894)
```
yarn prettier
``` ## 贡献者
4. Fix prettier - [ZzzhangLK](https://github.com/ZzzhangLK/)
- [codeghj](https://github.com/codeghj)
```
yarn prettier:fix
```
5. Fix lint and prettier
```
yarn format
```
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论