使用 React 的方式开发小程序的框架,同时支持生成多端应用 https://github.com/NervJS/taro
|
|
3 weeks ago | |
|---|---|---|
| .gitignore | 3 years ago | |
| LICENSE | 3 years ago | |
| README.md | 3 weeks ago |
基于 React Navite (可使用React/Vue/Nerv),支持国内 小程序,h5,安卓,ios 应用。
Taro 的核心分为编译时(Compile Time)和运行时(Runtime):
docker run --rm -it -w /app -v $(pwd):/app node:22 /bin/bash
npm install -g @tarojs/cli
taro init myApp
# 微信小程序
cd myApp
npm install
yarn add @tarojs/plugin-platform-h5
npm run dev:weapp
npm run build:weapp
npm run build:harmony-hybrid
npm run build:jd
npm run build:alipay
npm run build:h5
# react navite 打包ios,安卓app
npm install @tarojs/rn-runner
npm run dev:rn
npm run build:rn
项目结构:
├── config # 项目编译配置 │ ├── dev.js # 开发环境配置 │ ├── index.js # 默认配置 │ └── prod.js # 生产环境配置 ├── src # 源码目录 │ ├── pages # 页面文件 │ ├── app.config.ts # 全局配置文件 (路由、窗口表现) │ └── app.ts # 项目入口文件 └── package.json