diff --git a/bench/templates/depth-1.js b/bench/templates/depth-1.js new file mode 100644 index 000000000..74809bca8 --- /dev/null +++ b/bench/templates/depth-1.js @@ -0,0 +1,6 @@ +module.exports = { + context: { names: [{name: "Moe"}, {name: "Larry"}, {name: "Curly"}, {name: "Shemp"}], foo: 'bar' }, + handlebars: "{{#each names}}{{../foo}}{{/each}}", + mustache: "{{#names}}{{foo}}{{/names}}", + eco: "<% for item in @names: %><%= @foo %><% end %>" +}; diff --git a/bench/templates/depth-2.js b/bench/templates/depth-2.js new file mode 100644 index 000000000..1d38baa4e --- /dev/null +++ b/bench/templates/depth-2.js @@ -0,0 +1,6 @@ +module.exports = { + context: { names: [{bat: 'foo', name: ["Moe"]}, {bat: 'foo', name: ["Larry"]}, {bat: 'foo', name: ["Curly"]}, {bat: 'foo', name: ["Shemp"]}], foo: 'bar' }, + handlebars: "{{#each names}}{{#each name}}{{../bat}}{{../../foo}}{{/each}}{{/each}}", + mustache: "{{#names}}{{#name}}{{bat}}{{foo}}{{/name}}{{/names}}", + eco: "<% for item in @names: %><% for child in item.name: %><%= item.bat %><%= @foo %><% end %><% end %>" +};