一、安装nodejs
brew install node
二、安装week
sudo cnpm install -g weex-toolkit@beta
注意:官方文档上说,weex-toolkit只有最新的beta版本才支持初始化vue
三、检测是否安装成功
输入命令:weex --version
输入命令:weex
v1.0.1-beta.6
Usage: weex[options]
Usage: weex init [projectName]
选项:
--port http listening port number ,default is 8081 [默认值: 8081]
--wsport websocket listening port number ,default is 8082 [默认值: 8082]
--output to build the js bundle to the specify a path [默认值: "no JSBundle output"]
Usage:weexwhereis one of:
debug start weex debugger
compile compile we/vue file
run run your projectweex
--help help on