diff --git a/README.md b/README.md
index aeb4b8b..63d13b3 100644
--- a/README.md
+++ b/README.md
@@ -114,7 +114,7 @@ You can include/exclude files using global parameters in config file.
2. Add `{{incl ...}}` helper with the specified parameter in file path and/or file name.
-```
+```yaml
globalParams:
...
addTests: false
@@ -162,6 +162,55 @@ And use the partials in templates:
{{> hello name="Developer"}}
```
+## Helpers
+In config yaml file:
+```yaml
+globalParams:
+ items:
+ - name: "name1"
+ type: "type1"
+ ...
+ - name: "name2"
+ type: "type2"
+ ...
+```
+`filterByAllOf` filters `items` by all pair key-value (AND condition), for example:
+```handlebars
+{{~#each (filterByAllOf items type="type1" name="name1")}}
+{{! there will only be items when type="type1" and name="name1"}}
+{{~/each}}
+```
+`filterByOneOf` filters `items` by one of pair key-value (OR condition), for example:
+```handlebars
+{{~#each (filterByAllOf items type="type1" name="name2")}}
+{{! there will only be items when type="type1" or name="name2"}}
+{{~/each}}
+```
+`containsAllOf` checks for all pair key-value (AND condition) in `items`, for example:
+```handlebars
+{{~#if (containsAllOf items type="type1" name="name1")}}
+...
+{{~/if}}
+```
+`containsOneOf` checks for one of pair key-value (OR condition) in `items`, for example:
+```handlebars
+{{~#if (containsOneOf items type="type1" name="name2")}}
+...
+{{~/if}}
+```
+`containsKey` checks for exist key in `items`, for example:
+```handlebars
+{{~#if (containsKey items "type")}}
+...
+{{~/if}}
+```
+`containsValue` checks for exist value in `items`, for example:
+```handlebars
+{{~#if (containsValue items "type1")}}
+...
+{{~/if}}
+```
+
## License
Copyright 2021 IceRock MAG Inc
diff --git a/build.gradle.kts b/build.gradle.kts
index e64be22..40b6a50 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -4,7 +4,7 @@ plugins {
subprojects {
group = "dev.icerock.tools"
- version = "0.3.0"
+ version = "0.4.0"
apply(plugin = "org.jetbrains.kotlin.jvm")
}
diff --git a/install-shaper.sh b/install-shaper.sh
index 558f164..506792f 100755
--- a/install-shaper.sh
+++ b/install-shaper.sh
@@ -1,10 +1,10 @@
mkdir -p ~/.shaper && \
cd ~/.shaper && \
-curl -L -s "https://github.com/icerockdev/shaper/releases/download/release%2F0.3.0/shaper-cli-0.3.0.zip" > cli.zip && \
+curl -L -s "https://github.com/icerockdev/shaper/releases/download/release%2F0.4.0/shaper-cli-0.4.0.zip" > cli.zip && \
unzip -q cli.zip && \
rm cli.zip && \
rm -rf shaper-cli || true && \
-mv shaper-cli-0.3.0 shaper-cli && \
+mv shaper-cli-0.4.0 shaper-cli && \
echo "repositories:" > config.yaml && \
echo 'To complete setup add into your environments: export PATH=~/.shaper/shaper-cli/bin:$PATH'
echo 'After it you can call shaper by command: shaper-cli -i -o