zoukankan      html  css  js  c++  java
  • react-ts模板2.0

    最新整理的react模板2.0

    - react 16.12.0
    - react-router
    - redux,redux-thunk
    - hooks,typescript
    - antd v4,sass, less, dayjs
    - lodash,moment,uuid,js-cookie
    - suspense,lazy懒加载
    - axios antd主题切换
    

    运行和打包

    $ npm i
    $ npm start
    $ npm run build-dev // 测试打包
    $ npm run build-prod // 正式打包
    $ npm run analyze // 分析打包
    $ npm run lint // eslint检查
    

    react模板2.0 地址戳这里

    整合了最新的webpack4,alloy-eslint约束, ant design v4.0.0

    目录

    |————config --------------------- 启动和打包配置
    | |————webpack.config.js
    |————eslintRule ----------------- eslint规则
    |————scripts -------------------- 启动和打包脚本
    | |————build-analyze.js --------- 文件分析
    | |————build.js ----------------- 打包
    | |————start.js ----------------- 运行
    | |————test.js ------------------ 测试
    |————src ------------------------
    | |————api  --------------------- 业务逻辑层
    | |————assets  ------------------ 全局公用文件
    | | |————css  ------------------- css
    | | |————images  ---------------- 图片
    | | |————iconfont  -------------- 字体等
    | |————common  ------------------ 全局通用常量
    | |————components  -------------- 通用组件
    | | |————common  ---------------- 子组件封装
    | | | |————myList.tsx
    | | | |————myForm.tsx
    | | |————layout  ---------------- 布局
    | | | |————header.tsx
    | |————views  ------------------- 业务组件
    | | |————settlement ------------- 业务模块
    | | | |————Settlement.tsx
    | | |————index.tsx -------------- 入口
    | |————config ------------------- 全局配置
    | | |————routerConfig.tsx  ------ 路由配置
    | |————redux -------------------- redux
    | | |————rootReducer.ts  -------- reducer集合
    | | |————user.redux.ts  --------- state | action | reducer集成 | 按模块划分不同文件
    | |————typings ------------------ 接口集合
    | |————utils -------------------- 通用工具类
    |————.eslintrc.js --------------- eslint自定义
    |————.prettierrc.js ------------- prettier
    |————README.MD ------------------ 项目描述文件
    |————SETTINGS.MD ---------------- 运行配置介绍
    
    alloy-eslint

    参考SETTINGS.md

  • 相关阅读:
    Android实现App版本自动更新
    Android EditText+ListPopupWindow实现可编辑的下拉列表
    Android 侧滑面板的实现(DragLayout)
    android之SlideMenu双向滑动
    Android 从无到有打造一个炫酷的进度条效果
    Android 自定义View修炼-仿360手机卫士波浪球进度的实现
    TabLayout禁止选择
    Metasploit的攻击实例讲解----ms10_046快捷方式图标漏洞
    PowerDesigner 16.5的下载安装破解注册(图文详解)
    Metasploit的armitage初步使用
  • 原文地址:https://www.cnblogs.com/mapleChain/p/12427378.html
Copyright © 2011-2022 走看看