wepy README

The project's README from github.com/Tencent/wepy. As one markdown file: README.md.

English | 简体中文

📦 项目已归档

随着微信小程序生态的不断演进,本项目已不再活跃维护。WePY 早已完成了它的历史使命,现有代码已不再具有参考意义,我们建议新项目选用更现代的方案。

在开源的这些年里,由于个人精力问题,导致项目的维护和响应未能做好,在此真诚地向各位贡献者和使用者说一声抱歉。

再次感谢大家理解,继续前行 🤝

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。

特性:

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

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

Documentation

Changelog

Contributing

License MIT

wepy (Tencent/wepy)

Searching Database…

22.5K ·GitHub
archived
What is this?WePY is a framework for component-based development of WeChat Mini Programs: you write code in your preferred style and pre-compilation turns it into mini program code. It adds Promises, async functions and other conveniences to make mini program development simpler and more efficient.
So do I actually write Vue, or something that just looks like it?Something that looks like it. You write WePY components in a Vue-like style with ES2015+ syntax, and the WePY compiler pre-processes them — it borrows ideas from modern frontend tools but is its own framework, not Vue itself.
How do I get a project running?Install the wepy CLI tool, generate a starter project with it, install dependencies and run its watch-mode compile. Then point WeChat Developer Tools at the project root — it imports the project config automatically.
What do I need installed before starting?Node.js 8.9.4 or newer with npm for the toolchain, plus WeChat's own Developer Tools for previewing and debugging. Style and script compilers like Less, Sass, Stylus, PostCSS, Babel, TypeScript or Pug are chosen in the build config.
Is this still actively maintained?No. The project is archived: the README says WePY has completed its historical mission, the existing code is no longer a meaningful reference, and new projects should choose a more modern solution.
Who has actually built real mini programs with it?It saw wide production use, including inside Tencent itself: the Tencent vaccine lookup, Translator, Maps and Palace Museum mini programs, plus dozens of community apps, several of them open source.
Anything unusual about the license?The README points to MIT, but GitHub's automated detection reports NOASSERTION (no clearly detected license file), so check the actual LICENSE file before relying on it commercially.
Why does a mini program need a framework like this at all?WeChat's native mini program environment lacked many conveniences frontend developers expect. WePY layers component-based development, npm package support, Promises and ES2015+ syntax on top by pre-compiling your code into what the platform accepts.
What compilers and build features does it offer?For styles: Less, Sass, Stylus and PostCSS; for scripts: Babel or TypeScript; for templates: Pug. Plugins handle file and image compression and content replacement, and there is sourcemap and ESLint support plus mini program tweaks like request queueing.
What is the state of WePY 2?The README's latest section is WePY 2, still labeled beta — and with the project archived, it never moved past that. That is part of why the README steers new projects toward more modern solutions.
What are similar projects?mpvue, vant-weapp, weui-wxss, WxJava, postcss, Hover, uni-app, madge
Creator
Tencent
Size
8.9 MB
Stars
22.5K
Age
9y
Commits · 90 Days