zulip/static/third/handlebars
Rafid Aslam 33129059f4 deps: Upgrade and move `handlebars` from `static/third` to `npm`.
- Remove `handlebars.runtime.js` from static/third and fetch it from npm
- Upgrade `handlebars` to 3.0.3.

I change the test since there is a patch about line, written in
handlebars'
v2.0.0-beta.1 release note:
"Lines containing only block statements and whitespace are now removed."

Fixes part of #1709.
2017-03-04 21:49:02 -08:00
..
README.zulip.md Add README.zulip.md for handlebars. 2014-01-15 16:45:22 -05:00

README.zulip.md

We use the handlebars library to render HTML inside the browser.

Handlebars templates actually get compiled into JS functions that in turn get called via a runtime library.

We install handlebars as a node module, and then we copy the runtime to the static directory and add some copyright info. The former files reside in node_modules/handlebars.

In our installation we call ./tools/compile-handlebars-templates to build the file static/templates/compiled.js. (Then in staging/prod, that file also gets minified.) For the runtime, in dev mode we serve it from the static/third directory, and in prod we minify from the static/third directory.

There are also some node unit tests that use handlebars, and all the code that they use comes directly from node_modules/handlebars, including the runtime.