Closed mitchheddles closed 4 years ago
Can this be merged sometime in the future?
I will not merge this PR, since merging json-files and passing this to the templates
As a guideline, i added a mergeJSON-helper as reference. If it really is required to only receive a subset of the data in any given template, we could extend the onBeforeRender helper with a filepath, that is able to modify the data passed to the template.
Adds glob support for data files. It works by producing a data object using file names as keys. This is a breaking change however... Unless we put in a check for single file results and change the data structure accordingly.
This may need some more work to support nested data folders. e.g.
data/folder/file.json
.Happy to discuss.
Usage
Example
Related: #37