Installation

Handlebars is a template engine not a specific tool, so there are multiple ways you can use and install it. Handlebars templates can either be pre-compiled to improve performance, or you can compile them on the client side and have more flexibility with manipulating the templates themselves.

In this chapter we will take a look at downloading and setting up the necessary components to implement both of these methods.

Downloading the Handlebars library

Handlebars is easy to install as a js library since it has no other dependencies. To download the library, just go to http://handlebarsjs.com/ and click on the big download button, this should take you to the script, which you can save on your computer as handlebars.js:

Installing this file ...

Get Instant Handlebars.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.