Skip to content

Commit

Permalink
Add docs for incl helper in README
Browse files Browse the repository at this point in the history
  • Loading branch information
RezMike committed Apr 29, 2021
1 parent 73f5166 commit 9220397
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 9220397

Please sign in to comment.