Closed karlitos closed 4 years ago
See the Optionally pass your own handlebars section under Usage
.
const helpers = require('handlebars-helpers');
helpers({ handlebars: HandlebarsAsync });
helpers({ handlebars: Handlebars });
The return value from the helpers
function above is just the object of registered helpers on the Handlebars
instance that you passed in. I'm not sure how promised-handlebars
works, so you might run into issues that don't have anything to do with this library (handlebars-helpers
).
Many thanks I will give it a try.
I'd like to migrate from the Swag library to handlebar helpers, since Swag is unmaintained and depends ob old and vunnerable version of Handlebars. My app depends on Handlebars and HandlebarsAsync and I use Swag like this:
How should it look like with handlebars-helpers ?