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 .
  • 相关阅读:
    MQTT介绍与使用
    SVN的搭建与使用
    Git版本控制之ubuntu搭建Git服务器
    蓝奏云的速度好快
    放大器的定义和主要参数
    模拟信号导论
    模拟电子电路学习笔记
    二极管单向导电的理解
    让蜂鸣器发声
    蜂鸣器的介绍
  • 原文地址:https://www.cnblogs.com/Jsonlu/p/5635663.html
Copyright © 2011-2022 走看看