All Projects → walid1992 → Weex Frame

walid1992 / Weex Frame

weex 基于vue2.0开发框架

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Weex Frame

weex-vue-starter-kit
weex starter kit in vue to use weexpack & weex both.(support hot-reload)
Stars: ✭ 24 (-94.55%)
Mutual labels:  weex
XiaoxiaZhihuWeex
XiaoxiaZhihu(zhihu daily) client written by Weex.
Stars: ✭ 15 (-96.59%)
Mutual labels:  weex
Thera
Thera is an integrated development environment(IDE) powered by Alibaba.com aimed for improving mobile hybrid solution develop experience, such as weex, luaview, react native.
Stars: ✭ 298 (-32.27%)
Mutual labels:  weex
xiazhou-weex
a demo for weex project
Stars: ✭ 49 (-88.86%)
Mutual labels:  weex
weex-dingtalk-cli
👽 A simple CLI for scaffolding Dingtalk Weex Microapp projects.
Stars: ✭ 33 (-92.5%)
Mutual labels:  weex
incubator-weex-site
Apache Weex (Incubating)
Stars: ✭ 84 (-80.91%)
Mutual labels:  weex
weexbox-android-library
Weex Android SDK
Stars: ✭ 22 (-95%)
Mutual labels:  weex
Luaviewsdk
A cross-platform framework to build native, dynamic and swift user interface - 强大轻巧灵活的客户端动态化解决方案
Stars: ✭ 3,586 (+715%)
Mutual labels:  weex
bui-weex-sample
bui-weex示例工程,包含了丰富的组件展示案例
Stars: ✭ 29 (-93.41%)
Mutual labels:  weex
Nat
A powerful kit for adding native functionalities to your weex app.
Stars: ✭ 294 (-33.18%)
Mutual labels:  weex
eros-plugin-ios-TencentCaptcha
腾讯防水墙、滑动验证、类似bilibili滑动验证码
Stars: ✭ 21 (-95.23%)
Mutual labels:  weex
weex-nat-camera
natjs.com/#/#camera
Stars: ✭ 20 (-95.45%)
Mutual labels:  weex
Yanxuan Weex Demo
🎨 High quality pure Weex demo / 网易严选 App 感受 Weex 开发
Stars: ✭ 3,052 (+593.64%)
Mutual labels:  weex
weex-flymeui
🐼 A Flyme Style UI library based on Weex for Creator.
Stars: ✭ 66 (-85%)
Mutual labels:  weex
Weex
A framework for building Mobile cross-platform UI
Stars: ✭ 17,793 (+3943.86%)
Mutual labels:  weex
eros-cli
🛠️ A simple CLI for scaffolding weex projects, we provide eros-template to quickly build small and medium sized app.
Stars: ✭ 41 (-90.68%)
Mutual labels:  weex
hello-iui
⚙️ iui uniapp组件库演示示例【停止维护】
Stars: ✭ 20 (-95.45%)
Mutual labels:  weex
Bui Weex
专门为 Weex 前端开发者打造的一套高质量UI框架
Stars: ✭ 370 (-15.91%)
Mutual labels:  weex
Coderyi.github.io
Don't fork! coderyi's blog,about iOS ,CS and my code life.
Stars: ✭ 349 (-20.68%)
Mutual labels:  weex
Crazydaily
[开源项目] 一款程序员日常放松的App,基于Material Design + MVP-Clean + Weex + Flutter + RxJava2 + Retrofit + Dagger2 + Glide + Okhttp + MTRVA + BRVAH + 炫酷控件 + 炫酷动画
Stars: ✭ 294 (-33.18%)
Mutual labels:  weex

GitHub release GitHub issues Node Version

weex-frame

weex 基于vue2.0开发框架,包括三端集成、组件库提供、weex api封装~

目前 Weex 官网域名统计如下:

https://weex.apache.org : Apache 官网地址,部署于 apache 仓库,国内访问速度较慢。
https://weex-project.io : Weex 官网中国镜像,部署于阿里云,国内访问速度较快。

大家可根据实际需求选择访问。

工作原理

先简单熟悉一下weex的工作原理,这里引用一下weex官网上的一张图片,详细信息见官网

Weex工作原理

开发环境搭建

weex 开发环境搭建

关于weex开发环境搭建问题见官方文档

android 、iOS 开发环境

关于native开发环境搭建问题见官方文档

框架说明

基于vue2.0搭建

像前面说的那样weex和vue一直在努力的进行生态互通,而且weex实现web标准化是早晚的问题,所以也建议开发者不要在用.we做后缀来开发了

native端多页模式、web端采用单页模式

  • 单页形态对于原生可能体验不够好,所以android与ios端采用多页模式
  • web端沿用spa模式标准

集成三端(android、ios、h5平台)

关于android、ios、h5平台的集成与打包问题,在项目中都以解决~

集成 weexpack 工具

可以使用weexpack相关功能~

集成eslint代码检查

代码检查是必要的操作,为了能够拥有vue开发的体验,将eslint集成进来~

注:

由于weexpack暂不支持vue问题,打包相关后续会集成进来~

框架介绍

package.json依赖

  "dependencies": {
    "vue": "^2.2.5",
    "vue-router": "^2.3.0",
    "vuex": "^2.2.1",
    "vuex-router-sync": "^4.0.1",
    "weex-vue-render": "^0.1.9"
  },
  "devDependencies": {
    "babel-core": "^6.20.0",
    "babel-eslint": "^7.1.1",
    "babel-loader": "^6.2.9",
    "babel-preset-es2015": "^6.18.0",
    "css-loader": "^0.26.4",
    "eslint": "^3.15.0",
    "eslint-config-standard": "^6.2.1",
    "eslint-loader": "^1.6.1",
    "eslint-plugin-html": "^2.0.1",
    "eslint-plugin-promise": "^3.4.2",
    "eslint-plugin-standard": "^2.0.1",
    "postcss-cssnext": "^2.9.0",
    "serve": "^1.4.0",
    "vue-loader": "^10.3.0",
    "vue-template-compiler": "^2.2.5",
    "webpack": "^1.14.0",
    "weex-devtool": "^0.2.64",
    "weex-loader": "^0.4.4"
  }

打包配置

1、 遍历.vue文件后缀,生成相应的entry.js文件

function getEntryFileContent (entryPath, vueFilePath) {
  const relativePath = path.relative(path.join(entryPath, '../'), vueFilePath);
  return 'let App = require("${relativePath}")
          // 全局注册 root 组件
          Vue.component('root', require("components/root"))
          // 全局注册 navpage 组件
          Vue.component('navpage', require("components/navpage"))
          App.el = '#root'
          new Vue(App)'
}

...

2、通过weex-loader打包生成native jsbundle 3、 通过weex-vue-loader打包生成web jsbundle


...

const webConfig = getBaseConfig()
webConfig.entry = {
  entry: path.resolve('./src/entry.js')
}
webConfig.output = {
  path: 'dist/web',
  filename: '[name].js'
}
webConfig.module.loaders[1].loaders.push('vue')

const weexConfig = getBaseConfig()
weexConfig.output.filename = 'weex/[name].js'
weexConfig.module.loaders[1].loaders.push('weex')

项目结构

weex-frame
├── platforms (平台项目)
│      │
│      ├── android 
│      └── ios
│
├── src (weex模块)
│      ├── api (api模块)
│      ├── components(组件模块) 
│      ├── constants(常量配置)   
│      ├── utils (工具模块)   
│      └── views(视图模块)  
│
└── dist (build输出模块)
       ├── weex (native使用jsbundle)
       └── web(web使用jsbundle) 
<!-- :title="title" -->
<!-- leftItemSrc="https://gitlab.com/toonteam/weex/raw/ce656f79084ed9db357f8abd76c6e6c82dc5a28d/src/views/person-info/imgs/back.png" -->
<!-- rightItemSrc="http://gtms02.alicdn.com/tps/i2/TB1ED7iMpXXXXXEXXXXWA_BHXXX-48-48.png" -->
<!-- @naviBarLeftItemClick="onBack" -->
<!-- @naviBarRightItemClick="onReload"> -->

项目启动

  1. git clone [email protected]:osmartian/weex-frame.git
  2. cd weex-frame
  3. 安装weexpack
npm install -g weexpack
  1. npm install
  2. 执行 ./start
  3. 设置调试环境
// 调试本地serve
npm run init serve
// 调试assets或者jsbundle文件
npm run init local

android 启动

  1. 打开andorid studio
  2. File -> New -> Import Project -> weex-frame/platforms/android -> 启动

或者:

weexpack run android

iOS 启动

  1. cd weex-frame/platforms/android
  2. pod install (未安装pod,请先安装)
  3. open WeexFrame.xcworkspace

或者:

weexpack run ios

h5 启动方式

打开 http://localhost:8080/web/index.html

或者:

weexpack run web

项目示例

h5 端示例

h5我的页面

h5发起页面

android 端示例

android首页

android我的页面

android发起页面

iOS 端示例

iOS首页

iOS我的页面

iOS发起页面

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].