From bd46585c40e2fa840ce6af7164d60e082aac1f04 Mon Sep 17 00:00:00 2001 From: Daniel Bulant Date: Sun, 1 Mar 2020 18:04:10 +0100 Subject: [PATCH] Add gitignore --- .gitignore | 4 ++++ README.md | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..94a5d01 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules +node_modules/* +node_modules/ +.ssh \ No newline at end of file diff --git a/README.md b/README.md index a04245e..9a56b65 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Easy plugins is based on Koa, so the ctx variable that's passed is koa's context The plugin must export object or function. Object should contain these: | enabled | Whether the plugin is enabled and should be used | +| ---- | ---- | | exec | Function to call when plugin is enabled and request matches rules | | rules | Object containing rules to be passed before calling exec. Can be function, in which case the context is passed and must return boolean (or Promise). If empty, automatically evaluates to true.| @@ -20,6 +21,7 @@ If the exported is function, it works as `multi-plugin`: The function gets parameter `hooks` which is a class for managing plugins. Then it should call function `hooks.registerPlugin` with the following parameters: | exec | Function to call when request rules matches | +| ---- | ---- | | rules | *optional*, same as in object plugin | ### Rules