render
render copied to clipboard
many-pairs rendering
I realize this may no longer be maintained, but wanted to post in case someone may have run across this.
I'm trying to render to multiple templates based on a json from the example
[{
"year": 2014,
"title": "Mansfield Park",
"slug": "mansfield-park"
}, {
"year": 2012,
"title": "Oblomow",
"slug": "oblomow"
}, {
"year": 2012,
"title": "Fathers and Sons",
"slug": "fathers-and-sons"
}]
and my command render test.handlebars \ --context test1.json --output {value.slug} --many-pairs --verbose
returns the error Rendering a collection requires an output filename template with placeholders, to avoid rendering each context set to the same file.
I've also been unable to get the --many to render from an array, get the following error:
/usr/local/lib/node_modules/render-cli/lib/index.js:74
contexts.forEach(function(context) {
^
TypeError: Cannot read property 'forEach' of undefined
Which may be potentially unrelated?