templates: Replace templates.render with require calls.

This removes an unnecessary layer of indirection and allows webpack to
catch filename mistakes.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2019-07-09 12:24:00 -07:00
committed by Tim Abbott
parent 706f13b671
commit db0b33842c
56 changed files with 340 additions and 207 deletions

View File

@@ -1,3 +1,4 @@
var render_message_reaction = require('../templates/message_reaction.hbs');
var Dict = require('./dict').Dict;
var reactions = (function () {
@@ -292,7 +293,7 @@ exports.view.insert_new_reaction = function (opts) {
context.class = "message_reaction";
}
var new_reaction = $(templates.render('message_reaction', context));
var new_reaction = $(render_message_reaction(context));
// Now insert it before the add button.
var reaction_button_element = exports.get_add_reaction_button(message_id);