aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaiwu <kaiwu2004@gmail.com>2024-07-20 15:51:27 +0800
committerkaiwu <kaiwu2004@gmail.com>2024-07-20 15:51:27 +0800
commitb78361725141dfde0e6ab0e14630c5aa557ecefa (patch)
tree2d34201de5cde73bd9100c1d0a07d0917566a738
parentb324f130ec46796b547830b2694f4bb320d20c8d (diff)
downloadwechat_dev_tools-b78361725141dfde0e6ab0e14630c5aa557ecefa.tar.gz
wechat_dev_tools-b78361725141dfde0e6ab0e14630c5aa557ecefa.zip
update readme
-rw-r--r--README.md18
1 files changed, 17 insertions, 1 deletions
diff --git a/README.md b/README.md
index 539a913..d82097f 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,14 @@
# wechat_dev_tools
-wechat_dev_tools is a template which enables developing wechat miniprograms in [gleam](https://gleam.run).
+Develop wechat miniprograms in [gleam](https://gleam.run).
It uses [esbuild]() and [esbuild-plugin-less]() to build `*.json`, `*.wxml` and `.wxss` files
[![Package Version](https://img.shields.io/hexpm/v/wechat_dev_tools)](https://hex.pm/packages/wechat_dev_tools)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/wechat_dev_tools/)
```sh
+$ git clone https://github.com/kaiwu/wechat_dev_tools.git your-project
+$ cd your-project
$ npm install
$ gleam build
```
@@ -14,6 +16,20 @@ Further documentation can be found at <https://hexdocs.pm/wechat_dev_tools>.
## Development
+Update `src/bundle.gleam` so that it includes each one of your page and component
+
+```gleam
+pub fn pages() -> List(#(String, Constructor)) {
+ [#("index", index.page)]
+}
+
+pub fn components() -> List(#(String, Constructor)) {
+ [#("basic", basic.component)]
+}
+```
+
+Npm scripts are provided for convenience
+
```sh
$ npm run purge
$ npm run clean