• Stars
    star
    546
  • Rank 80,959 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

一个为微信小程序开发准备的基础骨架。A boilerplate application for wechat weapp runtime.

微信小程序骨架

一个为微信小程序开发准备的基础骨架

Build Status Dependency Status devDependency Status js-standard-style

For English

English

骨架特点

  • 开发阶段与生产阶段分离。
  • 自动化生成新页面所需文件并添加到配置中。
  • Standard Code Style校验全部的jsjson文件。
  • 开发阶段json配置文件可以有注释,方便备注。
  • 代码中集成部分文档内容,减少查文档的时间。
  • 开发阶段可以使用less完成样式编码,原因你懂得~ (如果你了解这些,当然可以支持sass等其他预处理样式)。
  • 借助babel自动进行ES2015特性转换,放心使用新特性。
  • 开发阶段用xml文件后缀取代wxml后缀,避免在开发工具中配置代码高亮。
  • Source Map
  • Travis CI

将项目克隆到本地

# 定位到任意目录
$ cd path/to/root

# 克隆仓库到指定的文件夹
$ git clone https://github.com/zce/weapp-boilerplate.git [project-name] --depth 1

# 进入指定的文件夹
$ cd [project-name]

安装项目NPM依赖

$ npm install

使用

开发阶段

执行如下命令

# 启动监视
$ npm run watch

通过微信Web开放者工具打开项目根目录下dist文件夹,预览~

可以通过任意开发工具完成src下的编码,gulp会监视项目根目录下src文件夹,当文件变化自动编译

创建新页面

执行如下命令

# 启动生成器
$ npm run generate
# 完成每一个问题
# 自动生成...

由于微信小程序的每一个页面有特定的结构,新建工作比较繁琐。可以通过此任务减少操作。

生产阶段

执行如下命令

# 启动编译
$ npm run build

生产阶段的代码会经过压缩处理,最终输出到dist下。

同样可以通过微信Web开放者工具测试。

开发计划

  • 自动化生成新页面所需文件;
  • 自动生成新页面时,自动添加配置到app.json
  • 加入ES2015Polyfill,支持类似Promise的新API
  • 自动刷新微信Web开放者工具中的预览;
  • HTML to WXML 转换器,让大家可以直接使用HTML元素开发;

相关项目

zce/weapp-demo

有问题?

Welcome PR or Issue!

许可

MIT © 汪磊

More Repositories

1

caz

A simple yet powerful template-based Scaffolding tools.
TypeScript
2,419
star
2

fearless

A dashboard scaffolding based on Vue.js 3.x & TypeScript created by Vite.
TypeScript
1,281
star
3

weapp-example

微信小程序示例教程
696
star
4

dashboard

A dashboard scaffolding based on Vue.js 3.0 created by Vite.
Vue
547
star
5

api-proxy

466
star
6

velite

Turns Markdown / MDX, YAML, JSON, or others into app's data layer with Zod schema.
TypeScript
377
star
7

weapp-todos

一个简单的任务清单小程序, awesome weapp demo, todos, todolist
JavaScript
279
star
8

music-player

a music player by express & angular || vue
JavaScript
179
star
9

weapp-locally

A locally app demo for wechat mini-program runtime.
JavaScript
171
star
10

weapp-beauty

一个测颜值的小程序,只为最美的你~
JavaScript
85
star
11

caz-prev

A simple yet powerful template-based Scaffolding tools.
TypeScript
85
star
12

html5up

HTML5 UP! Responsive HTML5 and CSS3 Site Templates
CSS
68
star
13

vue-devtools

An electron devtools extension for debugging Vue.js applications.
JavaScript
61
star
14

webpack-demo

webpack tutorials demo
JavaScript
53
star
15

dashboard-server

A JSON file RESTful API with authorization based on json-server
JavaScript
51
star
16

x-pages

A simple static pages development workflow (static site generator maybe)
JavaScript
47
star
17

vite-essentials

Vite essentials
JavaScript
42
star
18

baixiu

baixiu proj
PHP
38
star
19

zce-cli

A CLI tool for my personal productivity, Scaffolding tools move to zce/caz 👉
JavaScript
37
star
20

angular-boilerplate

JavaScript
33
star
21

vuejs-3-examples

Some examples of Vue.js 3.0.
Vue
28
star
22

electron-boilerplate

🚧 A boilerplate application for Electron runtime
TypeScript
24
star
23

baixiu-docs

baixiu proj documents
20
star
24

asar-updater

An auto updater for electron asar
JavaScript
17
star
25

tcb

All my tencent cloudbase sources.
HTML
17
star
26

ajax-tutorial

AJAX 网络编程基础教程
17
star
27

windows-st-portable

Sublime Text 3 portable version include some package(汪磊的Sublime Text 3绿色便携版,包括一些常用插件)
Python
17
star
28

angular-moviecat

moviecat by angular stack
JavaScript
15
star
29

newshop

基于 Node.js 中间层前后端分离架构方案实现的电商系统前台,UI 的 Code 由于时间的关系用的是别人堆出来的,有点乱~
TSQL
14
star
30

locally-server

A JSON file RESTful API based on json-server for zce/weapp-locally & zce/quickapp-locally
HTML
14
star
31

zce-gulp-demo

HTML
13
star
32

music-player-pages

A special feeling music player page
HTML
13
star
33

quickapp-locally

🚧 🚧 一个快应用的示例项目
12
star
34

itcast-tms

Itcast Teaching Management System
JavaScript
12
star
35

creative-theme

A personal blogging theme for Ghost, inspired by Casper
JavaScript
12
star
36

short

A short url service.
HTML
11
star
37

pages-store

GitHub Pages Storage Adapter for Ghost
JavaScript
10
star
38

web-essential-docs

Web 开发基础手册,以 PHP 为例
10
star
39

mobile-remote-control

smart phone remote control with node.js and socket.io
JavaScript
10
star
40

pages-boilerplate

Always a pleasure scaffolding your awesome static sites.
HTML
9
star
41

koa-xtpl

A node.js wrapper around xtemplate engine (easier for Koa 2)
JavaScript
9
star
42

generate-weapp-page

Auto generate wechat weapp page
JavaScript
8
star
43

mwa

TypeScript
7
star
44

qiniu-store

Qiniu Storage for Ghost
JavaScript
7
star
45

weapp-demo

微信小程序示例教程,案例涉及某瓣,所以下线了:https://github.com/zce/weapp-douban
7
star
46

github-hosts

6
star
47

reborn-pages

zce.me site pages
CSS
6
star
48

quickapp-boilerplate

6
star
49

oauth2-example

oauth2 server & client example
JavaScript
6
star
50

learning-webpack

Learning Webpack
JavaScript
6
star
51

babel

babel-core browser lib
JavaScript
5
star
52

chrome-markdown

Preview GitHub Flavored Markdown in Chrome
JavaScript
5
star
53

clean-blog

HTML
5
star
54

todos

Examples of any framework
JavaScript
5
star
55

quickapp

🚧 🚧 🚧 一个帮你管理 hap-tools(快应用开发工具)依赖项并封装其编译功能的模块,开箱即用,减少痛苦
JavaScript
5
star
56

feedback

A feedback system using electron
JavaScript
4
star
57

windows-st-portable-x64

汪磊的 sublime text 3 portable include some package
Python
4
star
58

react-ssr-demo

React SSR demo
JavaScript
4
star
59

learning-vue

Learning Vue.js
HTML
4
star
60

micua

C#
4
star
61

typora-reborn

reborn theme for Typora
CSS
4
star
62

newshop-live

随堂代码,完整版移步:
CSS
3
star
63

teachable-machine

JavaScript
3
star
64

zce

The zce personal info CLI
JavaScript
3
star
65

angular-todomvc

HTML
3
star
66

baixiu-pages

alibaixiu pages
HTML
3
star
67

jysrt

Extract srt contents from Jianying Pro projects.
HTML
3
star
68

webpack-multi-entry

HTML
3
star
69

minima.css

A personal minimalist CSS framework for myself, inspired by Mifa based on Milligram.
CSS
3
star
70

macos-st-packages

macOS Sublime Text 3 packages backup
Python
3
star
71

gatsby-plugin-minify

A Gatsby plugin to easily minify all result.
JavaScript
3
star
72

mock-prompt

mock inquirer prompt
JavaScript
3
star
73

m2i-cli

📝 ⇢ 🌄 A minimalist markdown to image converter
TypeScript
3
star
74

x-pages-example

An example of x-pages (Deprecated: See zce/pages-boilerplate#x-pages instead)
HTML
3
star
75

baixiu-backup

baixiu proj 👉
PHP
2
star
76

recorder

JavaScript
2
star
77

dashboard-pages

A dashboard pages
JavaScript
2
star
78

create-v-app

Create Vue apps with no build configuration.
JavaScript
2
star
79

osx-st-packages

macOS sublime text 3 packages backup
Python
2
star
80

create-pages

Set up a modern pages project by running one command.
JavaScript
2
star
81

on-line

Deprecated, Check if the internet connection is up 👉
JavaScript
2
star
82

zce.github.io

zce’s homepage
HTML
2
star
83

graphql-demo

JavaScript
2
star
84

node-xtemplate

A node.js wrapper around xtemplate engine
JavaScript
2
star
85

zce-react-app

JavaScript
2
star
86

m2i-server

A service to convert markdown to image.
HTML
2
star
87

douban-api-docs

2
star
88

Weibo

React Native Sina Weibo
Objective-C
2
star
89

ooh-node

Ooh node~
JavaScript
2
star
90

fakers

fake data in the browser and node.js
JavaScript
1
star
91

chrome-apps

JavaScript
1
star
92

simple-theme

A Simple Theme for Sublime Text, base on Theme - Soda
JavaScript
1
star
93

embed-parser

A parser for get embed data from url
JavaScript
1
star
94

reborn-mvc

A CoC MVC web framework for node.js
JavaScript
1
star
95

vue-ssr-demo

Vue.js SSR Demo
JavaScript
1
star
96

rime

汪磊(iceStone)的 Rime 输入法配置
Makefile
1
star
97

qrcode-server

QRCode Generator Server
TypeScript
1
star
98

node-mvc

node mvc from asp.net mvc
JavaScript
1
star
99

aeroplane

JavaScript
1
star
100

desktop-ui

desktop style pages
CSS
1
star