zoukankan      html  css  js  c++  java
  • weex-toolkit打包

    需要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 .
  • 相关阅读:
    编程浪子我的个人知识树
    JAVA基本数据类型
    JS导出数据为表格-csv
    table表格打印样式
    ENTER键指定事件
    legend生成表单边框效果
    js按拼音排序算法
    CommonJs规范
    iscroll在安卓高版本(6.0以上)某些机型上滑动卡顿问题的解决方法
    前端常见报错原因详解
  • 原文地址:https://www.cnblogs.com/Jsonlu/p/5635663.html
Copyright © 2011-2022 走看看