weex-toolkit打包

摘要:
需要2.15.1及以上的npm支持运行终端,查看版本npm--version如果版本低于2.15.1,需要更新sudonpminstall-gnpm安装weex-toolkitnpminstall-gweex-toolkitweex命令使用方法weexfoo/bar/we_file_or_dir_path[options]weexinitOptions:--qrdisplayQRcodeforna

需要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打包》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇C语言的面向对象设计 —— 对 X264/FFMPEG 架构探讨记录所有的登录操作日志下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

五十款阿里开源软件说明介绍

阿里巴巴的Github代码托管地址:https://github.com/alibaba 通过写这篇文章从开源中国站上面看了很多,也从那里将开源软件的基本的介绍和下载地址拷贝到了文章当中,总体给我的一个感受就是阿里的开源实在太强大了,多到需要花大量的时间去了解。今天写这篇文章主要是对阿里开源的项目比较陌生,通过本文也有了一个大体的认知。每个人每天有24小时...

weex create test-app Error: Cannot find module '../package.json'

weex create 报错 D:YLKJPro>weex create test-app Error: Cannot find module '../package.json' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:613:15) at...

weex 引导页(guide)页面

slider 和 indicator 都是 weex 的内置组件,且 indicator 是 slider 的子组件。 1.报错处理 原因解析:indicator 样式页面渲染慢 解决方案:indicator 的样式写为 内联样式 2.Guide.vue <!-- 引导页 --> <template> <div cl...

Weex 标签控件

1.滚动组件 <template> <scroller> <div repeat="{{list}}"> <text>{{name}}: ${{price}}</text> </div> </scroller> </template...

uniapp nvue开发注意事项

  主要参考官方文档:https://uniapp.dcloud.io/nvue-outline,但是一些常见的问题,自己遇到了,记录下先。 一、nvue是什么?   uni-app App端内置了一个基于 weex 改进的原生渲染引擎,提供了原生渲染能力。   在App端,如果使用vue页面,则使用webview渲染;如果使用nvue页面(native...

#Weex与Android交互(一)

用Weex开发Android程序 参考:开发HelloWorld程序(Weex开发) 1、创建Android工程 2、集成WeexSDK,参考[WEEX SDK 集成到 Android 工程](https://weex-project.io/cn/doc/advanced/integrate-to-android.html) 3、开发.we源码 4、编译....