mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
Storing these in Git seems kind of weird, but seems to be [1] the done thing. I have to say, it's a lot more appealing than getting 3 packages from npm installed globally on every prod and dev machine -- we already have too much of that with 'pip install'. We can upgrade these in the future by running 'npm update' in the repo root directory. [1] http://www.futurealoof.com/posts/nodemodules-in-git.html (imported from commit 60a9d6a7cafe742442d87e9f3abc25750e179780)
33 lines
745 B
JavaScript
33 lines
745 B
JavaScript
var handlebars = require("./handlebars/base"),
|
|
|
|
// Each of these augment the Handlebars object. No need to setup here.
|
|
// (This is done to easily share code between commonjs and browse envs)
|
|
utils = require("./handlebars/utils"),
|
|
compiler = require("./handlebars/compiler"),
|
|
runtime = require("./handlebars/runtime");
|
|
|
|
var create = function() {
|
|
var hb = handlebars.create();
|
|
|
|
utils.attach(hb);
|
|
compiler.attach(hb);
|
|
runtime.attach(hb);
|
|
|
|
return hb;
|
|
};
|
|
|
|
var Handlebars = create();
|
|
Handlebars.create = create;
|
|
|
|
module.exports = Handlebars; // instantiate an instance
|
|
|
|
// BEGIN(BROWSER)
|
|
|
|
// END(BROWSER)
|
|
|
|
// USAGE:
|
|
// var handlebars = require('handlebars');
|
|
|
|
// var singleton = handlebars.Handlebars,
|
|
// local = handlebars.create();
|