Taro
开发文档:
开发记录:
1.使用命令创建模板项目
$ taro init myApp
2.进入项目目录开始开发,目前已经支持 微信/百度/支付宝小程序、H5 以及 ReactNative 等端的代码转换,针对不同端的启动以及预览、打包方式并不一致
3.更新项目
# taro $ taro update self # npm npm i -g @tarojs/cli@latest # yarn yarn global add @tarojs/cli@latest
更新项目中 Taro 相关的依赖
$ taro update project
4.运行
npm run dev:h5
真机运行:
npm i -g @tarojs/cli@latest 更新版本到最新
更新之后要记得 taro update project
npm i @tarojs/rn-runner --save-dev
npm设置镜像源
npm config set registry https://registry.npm.taobao.org --global npm config set disturl https://npm.taobao.org/dist --global
npm install -g yarn react-native-cli
yarn config set registry https://registry.npm.taobao.org --global yarn config set disturl https://npm.taobao.org/dist --global
posted on 2019-08-14 17:35 david_vip123 阅读(354) 评论(0) 收藏 举报
浙公网安备 33010602011771号