Restore module scope in base.js
This commit is contained in:
Vendored
+4
-2
@@ -26,6 +26,8 @@ THE SOFTWARE.
|
||||
|
||||
var Handlebars = {};
|
||||
|
||||
(function(Handlebars) {
|
||||
|
||||
Handlebars.VERSION = "1.0.0-rc.3";
|
||||
Handlebars.COMPILER_REVISION = 2;
|
||||
|
||||
@@ -59,8 +61,6 @@ var toString = Object.prototype.toString, functionType = "[object Function]";
|
||||
Handlebars.registerHelper('blockHelperMissing', function(context, options) {
|
||||
var inverse = options.inverse || function() {}, fn = options.fn;
|
||||
|
||||
|
||||
var ret = "";
|
||||
var type = toString.call(context);
|
||||
|
||||
if(type === functionType) { context = context.call(this); }
|
||||
@@ -166,6 +166,8 @@ Handlebars.registerHelper('log', function(context, options) {
|
||||
var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;
|
||||
Handlebars.log(level, context);
|
||||
});
|
||||
|
||||
}(Handlebars));
|
||||
;
|
||||
// lib/handlebars/compiler/parser.js
|
||||
/* Jison generated parser */
|
||||
|
||||
Vendored
+5
-6
@@ -24,8 +24,7 @@ THE SOFTWARE.
|
||||
|
||||
// lib/handlebars/base.js
|
||||
|
||||
/*jshint eqnull:true*/
|
||||
this.Handlebars = {};
|
||||
var Handlebars = {};
|
||||
|
||||
(function(Handlebars) {
|
||||
|
||||
@@ -62,8 +61,6 @@ var toString = Object.prototype.toString, functionType = "[object Function]";
|
||||
Handlebars.registerHelper('blockHelperMissing', function(context, options) {
|
||||
var inverse = options.inverse || function() {}, fn = options.fn;
|
||||
|
||||
|
||||
var ret = "";
|
||||
var type = toString.call(context);
|
||||
|
||||
if(type === functionType) { context = context.call(this); }
|
||||
@@ -170,7 +167,7 @@ Handlebars.registerHelper('log', function(context, options) {
|
||||
Handlebars.log(level, context);
|
||||
});
|
||||
|
||||
}(this.Handlebars));
|
||||
}(Handlebars));
|
||||
;
|
||||
// lib/handlebars/utils.js
|
||||
|
||||
@@ -234,8 +231,10 @@ Handlebars.SafeString.prototype.toString = function() {
|
||||
}
|
||||
}
|
||||
};
|
||||
})();;
|
||||
})();
|
||||
;
|
||||
// lib/handlebars/runtime.js
|
||||
|
||||
Handlebars.VM = {
|
||||
template: function(templateSpec) {
|
||||
// Just add water
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
/*jshint eqnull: true */
|
||||
|
||||
module.exports.create = function() {
|
||||
|
||||
// BEGIN(BROWSER)
|
||||
|
||||
var Handlebars = {};
|
||||
|
||||
(function(Handlebars) {
|
||||
|
||||
Handlebars.VERSION = "1.0.0-rc.3";
|
||||
Handlebars.COMPILER_REVISION = 2;
|
||||
|
||||
@@ -37,8 +41,6 @@ var toString = Object.prototype.toString, functionType = "[object Function]";
|
||||
Handlebars.registerHelper('blockHelperMissing', function(context, options) {
|
||||
var inverse = options.inverse || function() {}, fn = options.fn;
|
||||
|
||||
|
||||
var ret = "";
|
||||
var type = toString.call(context);
|
||||
|
||||
if(type === functionType) { context = context.call(this); }
|
||||
@@ -145,10 +147,9 @@ Handlebars.registerHelper('log', function(context, options) {
|
||||
Handlebars.log(level, context);
|
||||
});
|
||||
|
||||
}(Handlebars));
|
||||
|
||||
// END(BROWSER)
|
||||
|
||||
|
||||
return Handlebars;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user