diff options
author | kaiwu <kaiwu2004@gmail.com> | 2024-07-20 15:51:27 +0800 |
---|---|---|
committer | kaiwu <kaiwu2004@gmail.com> | 2024-07-20 15:51:27 +0800 |
commit | b78361725141dfde0e6ab0e14630c5aa557ecefa (patch) | |
tree | 2d34201de5cde73bd9100c1d0a07d0917566a738 | |
parent | b324f130ec46796b547830b2694f4bb320d20c8d (diff) | |
download | wechat_dev_tools-b78361725141dfde0e6ab0e14630c5aa557ecefa.tar.gz wechat_dev_tools-b78361725141dfde0e6ab0e14630c5aa557ecefa.zip |
update readme
-rw-r--r-- | README.md | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -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 [](https://hex.pm/packages/wechat_dev_tools) [](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 |