Skip to content

Commit

Permalink
Merge pull request #26 from RezMike/incl-docs
Browse files Browse the repository at this point in the history
Add docs for `incl` helper in README
  • Loading branch information
Alex009 authored Apr 29, 2021
2 parents 73f5166 + 9220397 commit 096c9da
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,26 @@ class Test {
}
```

## Include/exclude files

You can include/exclude files using global parameters in config file.

1. Add global parameter(s) that can have value `true` or `false`.

2. Add `{{incl ...}}` helper with the specified parameter in file path and/or file name.

```
globalParams:
...
addTests: false
addDefaultTest: false
files:
- pathTemplate: '{{incl addTests}}src/main/kotlin/package/{{incl addDefaultTest}}DefaultTest.kt'
contentTemplateName: DefaultTest.kt
```

In this example, file `DefaultTest.kt` will be added only if both parameters `addFragment` and `addDefaultTest` are set to `true`.

## Partials

For use partials you can put your `.hbs` files in `includes` directories (multi-nesting support).
Expand Down

0 comments on commit 096c9da

Please sign in to comment.