weex 学习

APP 2018-07-04

一、安装调试
参考地址:
https://weex.apache.org/cn/guide/set-up-env.html
https://blog.csdn.net/xingxtao/article/details/79505997

npm 安装
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
$ cnpm install -g weex-toolkit
初始化
$ weex create awesome-project
运行
////npm run dev & npm run serve
添加 Android 或 iOS 平台:weex platform add android 或 weex platform add ios
在android上运行 weex run android

二、ui
UI地址:https://alibaba.github.io/weex-ui/#/?id=weex-ui
安装配置文档:https://alibaba.github.io/weex-ui/#/cn/with-weex-toolkit

一、确保 weex-toolkit 为新版本
npm install -g weex-toolkit@latest
错误就使用中国镜像:
cnpm install -g weex-toolkit@latest
二、使用 weex-toolkit 创建一个项目
weex create your_project
npm i
三、安装 weex-ui
npm i weex-ui@latest -S
四、安装babel-preset-stage-0 和 babel-plugin-component 插件,前者用于babel编译,后者用于优化 weex-ui 包的组件引用
npm i babel-plugin-component babel-preset-stage-0 -D


本文由 wenyi 创作,采用 知识共享署名 3.0,可自由转载、引用,但需署名作者且注明文章出处。

还不快抢沙发

添加新评论