{"id":20082639,"url":"https://github.com/lexmin0412/taro3-react-template","last_synced_at":"2026-03-07T02:33:45.322Z","repository":{"id":110140033,"uuid":"435755723","full_name":"lexmin0412/taro3-react-template","owner":"lexmin0412","description":"基于 Taro3 + React Hooks  + TypeScript + Scss 的开箱即用的多端项目模版，预置 eslint + stylelint + prettier + commitlint + editorConfig 的代码规范体系，封装自定义 tabbar、自定义导航栏等必备组件，一键生成页面/组件/service文件模版，一键启动小程序调试，更多功能持续迭代中...","archived":false,"fork":false,"pushed_at":"2025-03-21T15:20:20.000Z","size":8782,"stargazers_count":121,"open_issues_count":0,"forks_count":38,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-08-02T21:50:42.779Z","etag":null,"topics":["custom-tabbar","miniprogram","project-template","react","react-hooks","scss","taro","taro-template","taro3","taro3-template","template","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lexmin0412.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-07T05:33:16.000Z","updated_at":"2025-07-06T10:28:33.000Z","dependencies_parsed_at":"2024-04-12T13:58:33.277Z","dependency_job_id":"9ae2ec23-3896-4f57-b266-95c79856b65a","html_url":"https://github.com/lexmin0412/taro3-react-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/lexmin0412/taro3-react-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmin0412%2Ftaro3-react-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmin0412%2Ftaro3-react-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmin0412%2Ftaro3-react-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmin0412%2Ftaro3-react-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lexmin0412","download_url":"https://codeload.github.com/lexmin0412/taro3-react-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexmin0412%2Ftaro3-react-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30206070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-tabbar","miniprogram","project-template","react","react-hooks","scss","taro","taro-template","taro3","taro3-template","template","typescript"],"created_at":"2024-11-13T15:44:20.520Z","updated_at":"2026-03-07T02:33:45.302Z","avatar_url":"https://github.com/lexmin0412.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# taro3-react-template\n\n基于 Taro3 + React 的开箱即用多端项目模板。\n\n## 相关仓库\n\n- [taro2-template](https://github.com/lexmin0412/taro2-template/tree/2.x) - 基于 Taro2 的项目模板。\n\n## Repo Activity\n\n![Repo Activity](https://repobeats.axiom.co/api/embed/e39e5816e00d2a9627dca894852446b7f7c83463.svg \"Repobeats analytics image\")\n\n## 技术栈\n\n- Taro\n- React Hooks\n- TypeScript\n- NutUI\n- SCSS\n\n## 运行环境\n\n- Node 16+\n- Pnpm 8+\n\n## 适配平台\n\n- [x] H5\n- [x] 微信小程序\n\n由于部分平台的小程序注册门槛较高，如抖音、京东等平台均无法通过个人开发者身份注册，目前此模板只在 h5 / 微信小程序端经过验证。\n\n## 开始\n\n基于 [上述原因](#适配平台), 此模板只提供了 H5/微信小程序的调试/构建命令。\n\n### 本地开发\n\n#### 环境变量构建\n\n在根目录新建 .env 文件，写入环境变量\n\n```bash\nTARO_API_BASE=/api\n```\n\n#### 启动调试\n\n```shell\npnpm dev:h5 # h5\npnpm dev:weapp # 微信小程序\npnpm preview:weapp-local-watch # 启动小程序本地调试并打开微信开发者工具\n```\n\n### 构建产物\n\n```shell\npnpm build:h5 # h5\npnpm build:weapp # 微信小程序\n```\n\n## 支持特性\n\n- 🏠 基于 Taro3\n- 📦 支持 React\n- 🐑 CSS 预处理器( SCSS )\n- 🥣 完全使用 TypeScript 开发\n- 🔛 企业级的 request 类及拦截器封装\n- 👮 `eslint`+`stylelint`+`markdownlint`+`prettier`+`commitlint`+`editorConfig` 实现的全方位代码规范体系\n- 🔥 自定义 tabbar\n- 🌩️ 使用多核心及缓存提升编译速度\n- 💰 更多特性持续迭代中...\n\n## 目录结构\n\n```bash\n- .github  # Github 相关配置\n- config  # Taro 配置\n- generators  # Plop 模版配置\n- src  #源码目录\n  - custom-tab-bar  # 自定义 tabbar\n  - default  # 缺省页面\n  - demo  # 演示页面\n  - index  # 首页\n  - shared  # 公用代码\n    - assets  # 静态资源\n    - icons # 图标\n    - components  # 公共组件\n    - constants  # 常量\n    - interceptors  # 拦截器\n    - services  # 服务类\n    - store  # 状态管理\n    - styles  # 公共样式\n    - utils  # 工具类\n  - user  # 用户相关页面\n  - webview  # webview 功能演示\n- .editorConfig  # 编辑器编码风格配置\n- .env  # 本地环境配置\n- .eslintrc.js  # eslint 配置\n- .gitignore  # git 忽略配置\n- .markdownlint.yml  # markdownlint 配置\n- .npmrc  # npm 相关配置\n- .prettierignore  # prettier 忽略配置\n- babel.config.js  # babel 配置文件\n- commitlint.config.js  # commitlint 配置\n- global.d.ts  # ts 全局类型声明\n- package.json  # 你懂的\n- pnpm-lock.yaml  # pnpm 依赖锁文件\n- project.config.json  # 微信小程序配置\n- README.md  # 项目说明文档\n- tsconfig.json  # ts 配置\n```\n\n说明：与一般的项目结构划分不同，这里将所有静态资源、公用组件、状态管理等功能统一放到了 `src/shared` 目录下，而将页面目录直接平铺到了 src 目录，是出于以下原因：\n\n- 在 src 下直接按照模块组织能够更直观地展示整个系统的业务组成及模块划分\n- 没有规范限制页面文件一定要放在 `src/pages` 目录下，在遵循小程序规范设计配置文件的大前提下，它只会带来书写的负担\n- 一个文件，它要么是全局共享，要么是专为某个页面（模块）服务，`{shared, xxx, yyy, zzz}` 的目录结构会促使我在新增一个文件时更加谨慎地考虑它的作用范围\n\n当然，这纯属主观偏好，如果你想将页面文件放在 pages 目录下，那也无妨。\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=lexmin0412/taro3-react-template\u0026type=Timeline)](https://star-history.com/#lexmin0412/taro3-react-template\u0026Timeline)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexmin0412%2Ftaro3-react-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flexmin0412%2Ftaro3-react-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexmin0412%2Ftaro3-react-template/lists"}