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