taro - 1

$ npm install -g @tarojs/cli
$ taro init myApp
// 如果安装失败可手动执行
$ npm install
// 微信小程序编译预览及打包(去掉 --watch 将不会监听文件修改,并会对代码进行压缩打包

// yarn
$ yarn dev:weapp
$ yarn build:weapp

// npm script
$ npm run dev:weapp
$ npm run build:weapp

// 仅限全局安装
$ taro build --type weapp --watch
$ taro build --type weapp

// npx 用户也可以使用
$ npx taro build --type weapp --watch
$ npx taro build --type weapp
// H5 模式,无需特定的开发者工具,在执行完下述命令之后即可通过浏览器进行预览

// yarn
$ yarn dev:h5

// npm script
$ npm run dev:h5

// 仅限全局安装
$ taro build --type h5 --watch

// npx 用户也可以使用
$ npx taro build --type h5 --watch

猜你喜欢

转载自www.cnblogs.com/avidya/p/11607836.html