Skip to content

Commit b783617

Browse files
committed
update readme
1 parent b324f13 commit b783617

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,35 @@
11
# wechat_dev_tools
22

3-
wechat_dev_tools is a template which enables developing wechat miniprograms in [gleam](https://gleam.run).
3+
Develop wechat miniprograms in [gleam](https://gleam.run).
44
It uses [esbuild]() and [esbuild-plugin-less]() to build `*.json`, `*.wxml` and `.wxss` files
55

66
[![Package Version](https://img.shields.io/hexpm/v/wechat_dev_tools)](https://hex.pm/packages/wechat_dev_tools)
77
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/wechat_dev_tools/)
88

99
```sh
10+
$ git clone https://github.com/kaiwu/wechat_dev_tools.git your-project
11+
$ cd your-project
1012
$ npm install
1113
$ gleam build
1214
```
1315
Further documentation can be found at <https://hexdocs.pm/wechat_dev_tools>.
1416

1517
## Development
1618

19+
Update `src/bundle.gleam` so that it includes each one of your page and component
20+
21+
```gleam
22+
pub fn pages() -> List(#(String, Constructor)) {
23+
[#("index", index.page)]
24+
}
25+
26+
pub fn components() -> List(#(String, Constructor)) {
27+
[#("basic", basic.component)]
28+
}
29+
```
30+
31+
Npm scripts are provided for convenience
32+
1733
```sh
1834
$ npm run purge
1935
$ npm run clean

0 commit comments

Comments
 (0)