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