node-boiler icon indicating copy to clipboard operation
node-boiler copied to clipboard

Using hbs templates and view engine

Open sarthakpranesh opened this issue 5 years ago • 0 comments

Using hbs for dynamic page rendering in place of static pages.

Having the following error in the forked project in the test-dev branch on running "sudo nodeboil"-

TypeError: templates.map is not a function at Object.makeTemplates (**/node-boiler-dev/lib/helpers/fileGenerators.js:33:22)

code - makeTemplates: function(templates) { return templates.map(item => fsWritePromisified(./templates/${item}.hbs, contetMaker.templateContent(item)) .then(successHandler(${item}.hbs)) .catch(errorHandler) ); },

Error shows up when boil.yml has the following included and old views key commented out-

templates: partials: - 'header' - 'footer' views: - 'home' - 'profile'

link to the forked project:- https://github.com/sarthakpranesh/node-boiler/tree/test-dev

sarthakpranesh avatar May 16 '19 07:05 sarthakpranesh