Git Product home page Git Product logo

wepy's Introduction

WePY

npm version travis-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;
    .userinfo {
        color: @color;
    }
</style>
<template lang="pug">
    view(class='container')
        view(class='userinfo' @tap='tap')
            mycom(:prop.sync='myprop' @fn.user='myevent')
            text {{now}}
</template>

<script>
    import wepy from 'wepy';
    import mycom from '../components/mycom';

    export default class Index extends wepy.page {
        
        components = { mycom };
        data = {
            myprop: {}
        };
        computed = {
            now () { return new Date().getTime(); }
        };
        async onLoad() {
            await sleep(3);
            console.log('Hello World');
        }
        sleep(time) {
            return new Promise((resolve, reject) => setTimeout(resolve, time * 1000));
        }
    }
</script>

安装使用

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

npm install wepy-cli -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

wepy's People

Contributors

gcaufy avatar dlhandsome avatar dolymood avatar shenqihui avatar thunf avatar ringcrl avatar brucx avatar glore avatar imyth avatar rijn avatar milkmeowo avatar edwardzzz avatar afeiship avatar shoyuf avatar hyacinthus avatar ystarlongzi avatar yshkk avatar dy21335 avatar angrycans avatar zhenian avatar yingye avatar yjzhen avatar szpnygo avatar wangleto avatar duoyu119 avatar royalrick avatar jingxinxin avatar choicelin avatar baisheng avatar baranwang avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.