ericf / express-handlebars

A Handlebars view engine for Express which doesn't suck.
BSD 3-Clause "New" or "Revised" License
2.32k stars 382 forks source link

How to use multiple helper files? #175

Closed prabhg closed 8 years ago

prabhg commented 8 years ago

I have my helper functions defined across multiple files. Is there a way to define multiple helper files in config while creating hbs instance?

I tried passing an array to "helpers" property of the config but it did not work.

var hbs = exphbs.create({ defaultLayout: 'main', extname: '.hbs', helpers: [hbsHelpers, hbsBlockHelpers] });

dynnamitt commented 8 years ago

conf = { helpers: require('lodash').assign hbsHelpers,hbsBlockHelpers }

prabhg commented 8 years ago

Thanks! That works! Closing the issue