var hogan = require("hogan.js");
var template = hogan.compile('{{#list}}{{foo}}{{> par}}\n{{/list}}');
var partial = hogan.compile('/*{{partialData.name}}-{{partialData.age}}*/');
var result = template.render(
{
list: [
{ foo: 1 },
{ foo: 2 },
{ foo: 3, sub: { list: [{ foo: 4 }, { foo: 5 }] } }
],
partialData:{name:"george", age:30}
},
{ par: partial }
);
console.log(result);