Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✨ Additions
Can now render lists of items using section tags
{{#example}}
and{{/example}}
. Empty lists and falsy values aren't rendered:Added a "Templates" section to the documentation. Before, it was pretty simple because this only replaced one tag:
{{example}}
. With the addition of the section tag (and potentially more in the future), this needed to be documented.Added functions
renderGlob
andrenderToFolder
for programmatically rendering multiple files to either a string or compiling them to a folder. They were in the last v4 release, but were undocumented.renderGlob
takes a glob of files to render and calls a function with the filename and rendered contents.renderToFolder
is basically a programmatic version of the CLI that renders files matching the input glob and writes them to a destination folder (returning nothing).Can now handle the edge-case where an object property has a dot in its name:
💥 Breaking Changes
renderString
was renamedrender
renderTemplateFile
was renamedrenderFile
🐛 Known Issues
The output spacing isn't exactly what I want. I figured it's not a huge deal for now, but here's an example: