github302 / beautywe

👨‍💻‍ Write beautiful code for wechat mini app by the beautiful we!

Home Page:http://beautywejs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Write beautiful code for wechat mini app by the beautiful we 👨‍💻‍!

NPM Size NPM Version NPM Version

CircleCI Coverage Status

Intro

BeautyWe 是一套微信小程序的开发范式,它由几部分组成:

  • 核心类库 - @beautywe/core
    对 App、Page 进行封装抽象,并且提供插件机制

  • 插件生态@beautywe/plugin-xxx
    官方以插件的模式提供了各种解决方案,如「增强存储」、「事件发布订阅」、「状态机」、「Error」、「Logger」等。

  • 企业级框架 - @beautywe/framework
    基于 beautywe/core,提供一套开箱即用的项目框架,包含开发规范、构建任务、配置、NPM 等解决方案。

  • 自动化工具 - @beautywe/cli
    提供「新建应用」、「新建页面」、「新建插件」、「项目构建」等任务的命令行工具,解放双手。

Usage Example

npm i @beautywe/core @beautywe/plugin-event
import { BtApp } from '@beautywe/core';
import event from '@beautywe/plugin-event';

const myApp = new BtApp({
    // the code as you write for App()
});

myApp.use(event());

App(myApp);

之后,你就能使用 plugin-event 提供的能力了:

const myAPp = getApp();

// now you can listening and trigger an event
myApp.event.on('hello', (msg) => console.log(msg));
myApp.event.trigger('hello', 'I am jc');

更多详细内容,请查看:官方文档

Contact & Support

License

This project is licensed under the MIT license.

Copyright (c) JerryC Huang (huangjerryc@gmail.com)

About

👨‍💻‍ Write beautiful code for wechat mini app by the beautiful we!

http://beautywejs.com

License:MIT License


Languages

Language:JavaScript 100.0%