WebCompiler icon indicating copy to clipboard operation
WebCompiler copied to clipboard

Handlebars: compiling directory with templates

Open beho opened this issue 2 years ago • 1 comments

Hi,

I'm currently using something like this to compile Handlebars templates:

call node node_modules\handlebars\bin\handlebars Static\Templates -f Static\Templates\templates.js.

It takes all templates in the directory and compiles them to a single script.

Can this be achieved with WebCompiler? It seems to me that it is not because only a single input file (with extension) can be specified but I wanted to check to be sure.

Thanks a lot!

beho avatar Jun 07 '22 15:06 beho

Unfortunately, I have never used handlebars, but you could probably use Web Compiler to compile the individual files, then use Bundler & Minifier to combine them and minimize them.

failwyn avatar Jun 10 '22 03:06 failwyn