taro study notes (a)

A, taro Profile

taro is a follow react multiport syntax specification development solutions.

Use taro, only write a code, and then by the compilation tools taro, the source code can be compiled separately at different ends (WeChat applet, H5, RN, etc.) operation.

Second, the installation

Installation taro development tools @ tarojs / cli

#使用npm或者yarn全局安装,或者直接使用npx
npm install -g @tarojs/cli

yarn global add @tarojs/cli

#安装cnpm(淘宝镜像速度更快)
npm install -g cnpm --registry=https://registry.npm.taobao.org 

Use command to create a template project

taro init myApp

Development of the start command

npm run dev:h5  web

npm run dev:weapp 微信小程序

npm run dev:alipay 支付宝小程序

npm run dev:swan 百度小程序

npm run dev:rn ReactNative

Compile command

npm run build:h5  web

npm run build:weapp 微信小程序

npm run build:alipay 支付宝小程序

npm run build:swan 百度小程序

npm run build:rn ReactNative

Third, the directory structure

Fourth, the actual use of taro create a small program Procedure

Simple project operating results

 

Published 72 original articles · won praise 7 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_39399966/article/details/102916457