1 Star 1 Fork 0

rdj / react_pc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

ts+react+react-router+mobx 模板项目

项目初始化安装依赖库

npm install
yarn

项目热重载调试启动

npm run start
yarn start

项目打包

npm run build
yarn build

项目测试

npm run test
yarn test

分析打包大小

npm run analyze
yarn analyze

检查代码风格 (本项目自动检测不需要额外运行)

npm run lint

react-cli详细配置

官网 Configuration Reference.

项目结构汇总

│  .browserslistrc --- 浏览器白名单(做浏览器兼容配置,现在可以直接在package.json配置)
│  .gitignore --- git忽略提交配置
│  postcss.config.js --- css代码转换工具配置(可以自动兼容浏览器版本或者利用插件进行样式单位转换,配置现在放在package.json配置)
│  setupProxy.js --- react代理服务器配置 http-proxy-middleware
│  package.json --- node npm模块及指令配置文件
│  README.md --- 说明文档
│  .env.development --- 开发环境变量设置文件
│  .env.production --- 正式环境变量设置文件
├─src --- 项目代码主工作目录
│   │  App.test.tsx --- 根节点组件页面
│   │  index.tsx  --- 入口文件
│   ├─asset --- 静态资源
│   ├─components  --- 常用组件、公用组件
│   ├─types --- 全局类型声明文件
│   ├─models --- 数据模型类 (表示数据格式及请求地址)
│   ├─views --- 页面文件目录
│   ├─utils --- 常用工具 http等
│   └─stores --- 前端数据状态管理器
├─public  --- 公共资源
│   ├─font --- 字体
│   ├─img --- 图片
│   ├─svg --- svg
└─node_modules  --- 安装好的npm模块

项目主要库及工具

  • react :react框架
  • create-react-app :react框架cli
  • react-router :react路由
  • mobx :mobx数据状态管理
  • typescript :typescript js超级集合面向对象写法
  • storybook :ui组件分离式开发同时提供展示及文档方法
  • analyze :分析打包大小问题
  • antd :蚂蚁金服ui组件库
  • axios :请求库
  • class-transformer: json数据转ts类对象处理库
  • class-validator: json数据 类型 验证库,
  • lodash :数据处理工具
  • moment :时间处理库
MIT License Copyright (c) 2020 rdj Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
TypeScript
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
TypeScript
1
https://gitee.com/RDJ_project/react_pc.git
git@gitee.com:RDJ_project/react_pc.git
RDJ_project
react_pc
react_pc
master

搜索帮助