1.5.0 • Published 2 years ago

cra-template-aio v1.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

cra-template-aio

GitHub npm npm

GitHub Repo stars

aio (ALL in one) 是已配置好前端常用开发组件的 create-react-app 模版,项目开箱可用。

目录

安装

npx create-react-app my-app-aio --template aio

运行

# http://localhost:3000
npm run start

已安装依赖

组件名称功能
react-router-dom路由
zustand状态管理
react-i18next国际化
@mui/material @emotion/react @emotion/styledMUI 组件
react-hook-form @hookform/resolvers joi表单处理及数据校验
axios网络请求
husky lint-staged prettier eslint-config-alloy eslint-config-react-app stylelint-config-standardCode style
@craco/cracoBuild config

推荐安装依赖

组件名称功能安装命令
@mui/icons-materialMaterial 图标npm install --save @mui/icons-material
date-fns日期时间处理npm install --save date-fns
lodash @types/lodash函数处理npm install --save lodashnpm install --save-dev @types/lodash

已知问题

  • 当使用 npx create-react-app my-app-aio --template aio 创建项目时
    • script prepare 不会自动执行,需要项目创建后手动执行
  • 当使用 pnpm create react-app my-app-aio --template aio 创建项目时
    • script prepare 不会自动执行,需要项目创建后手动执行
    • 需要自己手动删除 package-lock.json node_modules,然后执行 pnpm install
  • 当使用 yarn create react-app my-app-aio --template cra-template-aio 创建项目时
    • 不会自动运行 git init
  • 受限于 react-scripts 依赖限制,typescript 依赖目前只能支持到 4.9.5 版本,可在 packages.json 中添加 orerrides 解决依赖问题
  "overrides": {
    "react-scripts": {
      "typescript": "5.1.6"
    }
  }
1.5.0

2 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.0

3 years ago

1.3.5

3 years ago

1.3.0

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago