mirror of https://github.com/zulip/zulip.git
static: Remove unnecessary handlebars README.
This commit is contained in:
parent
955ef3b18c
commit
16873cd1ff
|
@ -75,6 +75,14 @@ static/js/invite.js: $('#streams_to_add').html(templates.render('invite_subsc
|
|||
|
||||
The second argument to `templates.render` is the context.
|
||||
|
||||
### Toolchain
|
||||
|
||||
Handlebars is in our `package.json` and thus ends up in
|
||||
`node_modules`; and then we have a script,
|
||||
`tools/compile-handlebars-templates`, which is responsible for
|
||||
compiling the templates, both in production and as they change in a
|
||||
development environment.
|
||||
|
||||
### Translation
|
||||
|
||||
All user-facing strings (excluding pages only visible to sysadmins or
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
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.
|
Loading…
Reference in New Issue