Handlebars Compile Function with options Parameters

Asked

Viewed 63 times

0

I want to minify my template during the build period of the same on Nodejs

Researching about I discovered that the handlebars.compile(templateLoaded); has more options than the template parameter. I would like to know how to pass the Minify parameter correctly and what are the other options that could be passed.

At this link, the highlighted lines allow this.

I asked the same question on the SOEN, If anyone wants to answer there also help.

1 answer

1

Before we think about compiling Handlebars, think about minifying HTML.

Okay, but what about Handlebars' properties, how do they look?

In fact, it’s time to link useful to pleasant: use a minifier that commits HTML from behind. Who does exactly that is this helper.

  • And the options not to use the helper. I can’t get anything clear about it, if there’s anything in JSON format that I can send.

  • You cannot do this directly. This, by the way, is explained on the site itself through of this documentation. You can minify through the command line with the helper I gave you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.