Handlebars are nice! This package helps to read a directory as compile the
.hbs files into templates. They can be references by their name (with and without extension). It also registers every file as partial, so it can be referenced from other files.
Install it using NPM:
npm install --save handlebars-dir
NamedTemplateParser like to interact with the API:
const Handlebars = ;const NamedTemplateParser = ;// load it on its own scopeconst hb = Handlebars;const parser = hb;// syncparser;// asyncawait parser;// resultconst result = parser;
You can also manually add named templates to the parser: