handlebars.runtime.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. define(
  2. ["./handlebars/base","./handlebars/safe-string","./handlebars/exception","./handlebars/utils","./handlebars/runtime","exports"],
  3. function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __exports__) {
  4. "use strict";
  5. /*globals Handlebars: true */
  6. var base = __dependency1__;
  7. // Each of these augment the Handlebars object. No need to setup here.
  8. // (This is done to easily share code between commonjs and browse envs)
  9. var SafeString = __dependency2__["default"];
  10. var Exception = __dependency3__["default"];
  11. var Utils = __dependency4__;
  12. var runtime = __dependency5__;
  13. // For compatibility and usage outside of module systems, make the Handlebars object a namespace
  14. var create = function() {
  15. var hb = new base.HandlebarsEnvironment();
  16. Utils.extend(hb, base);
  17. hb.SafeString = SafeString;
  18. hb.Exception = Exception;
  19. hb.Utils = Utils;
  20. hb.VM = runtime;
  21. hb.template = function(spec) {
  22. return runtime.template(spec, hb);
  23. };
  24. return hb;
  25. };
  26. var Handlebars = create();
  27. Handlebars.create = create;
  28. __exports__["default"] = Handlebars;
  29. });