diff options
Diffstat (limited to 'README.md')
-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 |