需要2.15.1及以上的npm支持

运行终端,查看版本

npm --version

如果版本低于2.15.1,需要更新

sudo npm install -g npm

安装weex-toolkit

npm install -g weex-toolkit

weex命令使用方法

weex foo/bar/we_file_or_dir_path  [options]
weex init Options:
--qr display QR code for native runtime,
-o,--output transform weex we file to JS Bundle, output path (single JS bundle file or dir)
[for create sub cmd] it specified we file output path
--watch using with -o , watch input path , auto run transform if change
happen
-s,--server start a http file server, weex .we file will be transforme to JS bundle on the server , specify local root path using the option
-h, --host specify server listening IP
--port http listening port number ,default is 8081
--wsport websocket listening port number ,default is 8082
-f, --force [for create sub cmd] force to replace exsisting file(s)
--np do not open preview browser automatic
--version show version of weex toolkit
--help Show help

示例

1.预览.we文件内容

weex your_best_weex.we

2.转换单个js包

weex your_best_weex.we -o .

3.转换.we目录为.js目录

weex we/file/storage/path -o outputpath

4.在官方示例中看自己的测试

weex your_best_weex.we --qr

5.启动本地服务

weex -s .

weex-toolkit打包的更多相关文章

  1. weex和vue开发环境配置详解(配置系统变量等等)

    本文详细讲解如何搭建weex和vue开发环境 安装java 现在java安装包,网上的安装包都是国外的,很难下载下来 就用这个链接下载,亲测无毒,http://www.wmzhe.com/soft-3 ...

  2. weex安装失败,按照官网步骤多次失败后成功

    在安装Weex Toolkit之前,需要确保安装了node, npm. yangfeifei:~ yff$ node -v v6.10.2 yangfeifei:~ yff$ npm -v 3.10. ...

  3. weex开发错误汇总

    weex run serve 报UglifyJS错 ANDROID_HOME环境变量 weex build android需要ANDROID_HOME, 请配置 D:\adt-windows-x86_ ...

  4. 0前端 框架 库_千万别去碰js呀 混合APP_webAPP_美工 选有类型的语言,比如TypeScript

    常用知识点,技巧 添加库到本地: (举例 element-ui) 用npm命令行把包下载到本地 在电脑里找到资源文件,比如 C:\Users\XiaoCong\AppData\Roaming\npm\ ...

  5. vue源码分析—Vue.js 源码目录设计

    Vue.js 的源码都在 src 目录下,其目录结构如下 src ├── compiler # 编译相关 ├── core # 核心代码 ├── platforms # 不同平台的支持 ├── ser ...

  6. Vue packages version conflicts 错误修复

    我们在使用Vue作为weex中的前端框架的开发过程中,某次 npm start 遇到了如下的错误: Vue packages version mismatch: - vue@2.5.16 - vue- ...

  7. Hbulder 调试安卓app

    目前开发app有原生开发和web开发两种方式,各有各的优势和劣势,利用web技术开发app可以只用写一套代码,即可以在Android和ios同时应用,比较方便和快捷,有很多中不同的开发方式,例如cor ...

  8. Vue.js 源码构建(三)

    Vue.js 源码是基于 Rollup 构建的,它的构建相关配置都在 scripts 目录下. 构建脚本 通常一个基于 NPM 托管的项目都会有一个 package.json 文件,它是对项目的描述文 ...

  9. Vue.js 源码目录设计(二)

    Vue.js 的源码都在 src 目录下,其目录结构如下. src ├── compiler # 编译相关 ├── core # 核心代码 ├── platforms # 不同平台的支持 ├── se ...

随机推荐

  1. [BZOJ 1029] [JSOI2007] 建筑抢修 【贪心】

    题目链接:BZOJ - 1029 题目分析 使用一种贪心策略. 现将任务按照deadline从小到大排序. 然后枚举每一个任务,如果当前消耗的时间加上完成这个任务的时间不会超过这个任务的deadlin ...

  2. nodejs注册为windows服务

    http://blog.csdn.net/puncha/article/details/9047311 http://www.oschina.net/question/12_18694 http:// ...

  3. 【POJ1113】Wall(凸包)

    [题目] Description Once upon a time there was a greedy King who ordered his chief Architect to build a ...

  4. 基于springMVC+springSecurity3.x+Mybaits3.x的权限系统,,开放源码,支持开源

    原文地址:http://blog.csdn.net/mmm333zzz/article/details/16863543/

  5. 在非UI线程中更改UI(Delphi使用隐藏窗口来处理,QT使用信号槽)

    在Delphi里我记得是使用TThread.Synchronize(TThreadMethod),原理是利用了一个隐藏窗口来处理. 在QT Debug模式一下,碰到了同样的问题,显示错误: canno ...

  6. mysql表分区、查看分区

    原文地址:http://blog.csdn.net/feihong247/article/details/7885199 一.       mysql分区简介 数据库分区 数据库分区是一种物理数据库设 ...

  7. ListView 滚动条的图标样式

    android:fastScrollEnabled="true" android:focusable="true" 在listview的xml文件中添加这两条记 ...

  8. ☀【SeaJS】SeaJS Grunt构建

    如何使用Grunt构建一个中型项目?https://github.com/twinstony/seajs-grunt-build spmjshttp://docs.spmjs.org/doc/inde ...

  9. HDOJ/HDU 1062 Text Reverse(字符串翻转~)

    Problem Description Ignatius likes to write words in reverse way. Given a single line of text which ...

  10. SRM 386(1-250pt)

    DIV1 250pt 题意:题意很难翻译....其实就是一个暴力...在看到有一个限制条件的范围为1-10的时候就该想到是暴力,我却半天没想到.... tag:brute-force // BEGIN ...