Taro —— 開發微信小程序總結

Taro官網:https://nervjs.github.io/taro/GETTING-STARTED.html#

利用Taro框架編寫的一套可多端運行的代碼(影力星球):https://github.com/wushuxuan/taro_movies

安裝及使用

1、安裝:

npm install -g @tarojs/cli

2、創建項目:

taro init movies

這裏寫圖片描述

3、編譯預覽:

  • 小程序
# npm script
$ npm run dev:weapp
# 僅限全局安裝
$ taro build --type weapp --watch
# npx用戶也可以使用
$ npx taro build --type weapp --watch
  • h5
# npm script
$ npm run dev:h5
# 僅限全局安裝
$ taro build --type h5 --watch
# npx用戶也可以使用
$ npx taro build --type h5 --watch
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章