From 80c62d7463d49743f229b436d9c8437abd9566d1 Mon Sep 17 00:00:00 2001 From: tami5 Date: Sun, 9 Jan 2022 05:08:46 +0300 Subject: [PATCH] doc(readme): update --- CHANGELOG.md | 38 ++++++++++++++++++++++++++++++++++++++ README.md | 7 +++++-- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 467cd01..9e69c44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,44 @@ passed in `#duct.reitit/logging{:types []}` because logging shouldn't be done there. +### Module + + +
398ae33 ♻️ Refactor: Total rewrite and decoupling
- rename main router function key to `duct.reitit/router` instead of + `duct.router/reitit`. +- rename main handler function key to `duct.reitit/handler` instead of + `duct.handler/root`. +- create separate initializer for `duct.reitit/routes`. It seems to go + along the lines of decoupling processing steps. +- refactor `duct.module/reitit` and make more readable and easy to + reason with. +- move default config along with development and production profile + mutations to `duct/reitit/defaults.clj`. +- refactor reitit module initializer logic to somewhat general purpose + module initializer. + + ~~~clojure + (module/init + {:root :duct.reitit + :config config + :extra [(registry-tree registry)] + :store {:namespaces namespaces :routes routes} + :schema {::registry (registry-references registry) + ::routes [:routes :namespaces ::registry] + ::router [::routes ::options ::log] + ::log ::options + ::handler [::router ::options ::log]}}) + ~~~ + This make create modules similar duct.reitit easier. + TODO: move to external library. +- change tests to reflect new changes +- remove many redundant files. +
+ +### Readme + + +- 6b2ce55 📚 Documentation: Update ### Tests diff --git a/README.md b/README.md index 8e3c715..c0b30af 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ # Duct module.reitit -A [Duct][] module that sets [reitit][] as the application router with ring as a handler. +A [Duct][] module that sets [reitit][] as the application router with ring as a +handler. It provides two keys: `duct.reitit/router` an instance of +`reitit.ring/router` and `duct.reitit/handler` which is an instance of +`reitit.ring/ring-handler` [duct]: https://github.com/duct-framework/duct [reitit]: https://github.com/metosin/reitit @@ -10,7 +13,7 @@ A [Duct][] module that sets [reitit][] as the application router with ring as a To install, add the following to your project `:dependencies`: - [duct/module.reitit "0.1.0"] + [duct/module.reitit "0.3.0"] ## Usage