51 Star 176 Fork 0

腾讯开源 / wepy

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

English | 简体中文

WePY 2 (beta)

npm version travis-ci Github CI Coverage Status Dependency Status

介绍

WePY 资源汇总:awesome-wepy

WePY (发音: /'wepi/)是一款让小程序支持组件化开发的框架,通过预编译的手段让开发者可以选择自己喜欢的开发风格去开发小程序。框架的细节优化,Promise,Async Functions 的引入都是为了能让开发小程序项目变得更加简单,高效。

同时 WePY 也是一款成长中的框架,大量吸收借鉴了一些优化前端工具以及框架的设计理念和思想。如果 WePY 有不足地方,或者你有更好的想法,欢迎提交 ISSUE 或者 PR。

特性:

  • 类 Vue 开发风格
  • 支持自定义组件开发
  • 支持引入 NPM 包
  • 支持 Promise
  • 支持 ES2015+ 特性,如 Async Functions
  • 支持多种编译器,Less/Sass/Stylus/PostCSS、Babel/Typescript、Pug
  • 支持多种插件处理,文件压缩,图片压缩,内容替换等
  • 支持 Sourcemap,ESLint 等
  • 小程序细节优化,如请求列队,事件优化等

Demo

<style lang="less">
@color: #4D926F;
  .num {
  color: @color;
  }
</style>
<template>
  <div class="container">
    <div class="num" @tap="num++">
      {{num}}
    </div>
    <custom-component></custom-component>
    <vendor-component></vendor-component>
    <div>{{text}}</div>
    <input v-model="text"/>
  </div>
</template>
<config>
{
  usingComponents: {
    customComponent: '@/components/customComponent',
    vendorComponent: 'module:vendorComponent'
  }
}
</config>

<script>
  import wepy from '@wepy/core';

  wepy.page({
    data: {
      num: 0,
      text: 'Hello World',
    },
  });
</script>

安装使用

安装(更新) wepy 命令行工具。

npm install @wepy/cli@next -g

生成开发示例

wepy init standard myproject

安装依赖

cd myproject
npm install

开发实时编译

wepy build --watch

开发者工具导入项目

使用微信开发者工具新建项目,本地开发选择项目根目录,会自动导入项目配置。

哪些小程序是用 WePY 开发的

腾讯疫苗查询小程序、 腾讯翻译君小程序、 腾讯地图小程序、 玩转故宫小程序、 手机充值+、 手机余额查询、 手机流量充值优惠、 友福图书馆(开源)素洁商城(开源)NewsLite(开源)西安找拼车(开源)深大的树洞(开源)求知微阅读(开源)给你的 iPhone X 换个发型天天跟我买坚橙、 群脱单、 米淘联盟、 帮助圈、 众安保险福利、 阅邻二手书、 趣店招聘、 满熊阅读(开源: 微信小程序支付宝小程序)、 育儿柚道、 平行进口报价内参、 GitHub 掘金版、 班级群管、 鲜花说小店、 逛人备忘、 英语助手君、 花花百科、 独角兽公司、 爱羽客羽毛球、 斑马小店、 小小羽球、 培恩医学、 农资优选、 公务员朝夕刷题、 七弦琴小助手、 七弦琴大数据、 爽到家小程序、 应用全球排行(开源)we 川大(开源)、 聊会儿、 诗词墨客(开源)南京邮电大学(开源)

...

交流群

WePY 交流群已满 500 人,请加 gcaufy_helper 好友或者扫码加好友,验证回复 wepy 按照指引进群。

wepy_qr_code

参与贡献

如果你有好的意见或建议,欢迎给我们提 Issues 或 Pull Requests,为提升微信小程序开发体验贡献力量。
详见:CONTRIBUTING.md

腾讯开源激励计划 鼓励开发者的参与和贡献,期待你的加入。

Links

Documentation

Changelog

Contributing

License MIT

Tencent is pleased to support the open source community by making WePY available. Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. If you have downloaded a copy of the WePY binary from Tencent, please note that the WePY binary is licensed under the MIT License. If you have downloaded a copy of the WePY source code from Tencent, please note that WePY source code is licensed under the MIT License, except for the third-party components listed below which are subject to different license terms. Your integration of WePY into your own projects may require compliance with the MIT License, as well as the other licenses applicable to the third-party components included within WePY. A copy of the MIT License is included in this file. Other dependencies and licenses: Open Source Software Licensed Under the BSD 3-Clause License: ---------------------------------------------------------------------------------------- 1. istanbul 0.4.5 Copyright 2012 Yahoo! Inc. All rights reserved. Terms of the BSD 3-Clause License: -------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of [copyright holder] nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Open Source Software Licensed Under the MIT License: ---------------------------------------------------------------------------------------- 1. bable 6.5.2 Copyright (c) 2014-2016 Sebastian McKenzie <sebmck@gmail.com> 2. eslint 3.11.1 Copyright JS Foundation and other contributors, https://js.foundation 3. gulp 3.9.1 Copyright (c) 2013-2016 Fractal <contact@wearefractal.com> 4. lerna 2.0.0 Copyright (c) 2015-2016 Sebastian McKenzie <sebmck@gmail.com> 5. mocha 3.2.0 Copyright (c) 2016 JS Foundation and contributors, https://js.foundation 6. promise-polyfill 6.0.2 Copyright (c) 2014 Taylor Hakes Copyright (c) 2014 Forbes Lindesay 7. postcss 5.2.16 Copyright 2013 Andrey Sitnik <andrey@sitnik.ru> 8. sass 4.0.0 Copyright (c) Natalie Weizenbaum <nweiz@google.com> 9. stylus 0.54.5 Copyright (c) Automattic <developer.wordpress.com> 10. imagemin 5.2.2 Copyright (c) imagemin (github.com/imagemin) 11. redux 2.0.0 Copyright (c) 2015 Dan Abramov 12. axios 0.16.1 Copyright (c) 2014 Matt Zabriskie 13. vue 1.0.28 Copyright (c) 2013-2016 Yuxi Evan You 14. xmldom 0.1.27 Copyright (c) jindw <jindw@xidea.org> (http://www.xidea.org) 15. pug 2.0.0-beta6 Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca> Terms of the MIT License: --------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

WePY 是一款让小程序支持组件化开发的框架,通过预编译的手段让开发者可以选择自己喜欢的开发风格去开发小程序。框架的细节优化,Promise,Async Functions的引入都是为了能让开发小程序项目变得更加简单,高效 展开 收起
JavaScript 等 4 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
JavaScript
1
https://gitee.com/Tencent/wepy.git
git@gitee.com:Tencent/wepy.git
Tencent
wepy
wepy
master

搜索帮助