updated handlebar runtime

This commit is contained in:
kay.one 2013-06-01 10:15:42 -07:00
parent 0d7326c798
commit 68662b9cf4
2 changed files with 39 additions and 10 deletions

View File

@ -20,22 +20,23 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
@license
*/ */
// lib/handlebars/browser-prefix.js // lib/handlebars/browser-prefix.js
var Handlebars = {}; (function(undefined) {
var Handlebars = {};
(function(Handlebars, undefined) {
; ;
// lib/handlebars/base.js // lib/handlebars/base.js
Handlebars.VERSION = "1.0.0-rc.4"; Handlebars.VERSION = "1.0.0";
Handlebars.COMPILER_REVISION = 3; Handlebars.COMPILER_REVISION = 4;
Handlebars.REVISION_CHANGES = { Handlebars.REVISION_CHANGES = {
1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it
2: '== 1.0.0-rc.3', 2: '== 1.0.0-rc.3',
3: '>= 1.0.0-rc.4' 3: '== 1.0.0-rc.4',
4: '>= 1.0.0'
}; };
Handlebars.helpers = {}; Handlebars.helpers = {};
@ -67,7 +68,7 @@ Handlebars.registerHelper('helperMissing', function(arg) {
if(arguments.length === 2) { if(arguments.length === 2) {
return undefined; return undefined;
} else { } else {
throw new Error("Could not find property '" + arg + "'"); throw new Error("Missing helper: '" + arg + "'");
} }
}); });
@ -124,6 +125,9 @@ Handlebars.registerHelper('each', function(context, options) {
var fn = options.fn, inverse = options.inverse; var fn = options.fn, inverse = options.inverse;
var i = 0, ret = "", data; var i = 0, ret = "", data;
var type = toString.call(context);
if(type === functionType) { context = context.call(this); }
if (options.data) { if (options.data) {
data = Handlebars.createFrame(options.data); data = Handlebars.createFrame(options.data);
} }
@ -168,6 +172,9 @@ Handlebars.registerHelper('unless', function(conditional, options) {
}); });
Handlebars.registerHelper('with', function(context, options) { Handlebars.registerHelper('with', function(context, options) {
var type = toString.call(context);
if(type === functionType) { context = context.call(this); }
if (!Handlebars.Utils.isEmpty(context)) return options.fn(context); if (!Handlebars.Utils.isEmpty(context)) return options.fn(context);
}); });
@ -269,6 +276,16 @@ Handlebars.VM = {
} }
return programWrapper; return programWrapper;
}, },
merge: function(param, common) {
var ret = param || common;
if (param && common) {
ret = {};
Handlebars.Utils.extend(ret, common);
Handlebars.Utils.extend(ret, param);
}
return ret;
},
programWithDepth: Handlebars.VM.programWithDepth, programWithDepth: Handlebars.VM.programWithDepth,
noop: Handlebars.VM.noop, noop: Handlebars.VM.noop,
compilerInfo: null compilerInfo: null
@ -341,5 +358,17 @@ Handlebars.VM = {
Handlebars.template = Handlebars.VM.template; Handlebars.template = Handlebars.VM.template;
; ;
// lib/handlebars/browser-suffix.js // lib/handlebars/browser-suffix.js
})(Handlebars); if (typeof module === 'object' && module.exports) {
// CommonJS
module.exports = Handlebars;
} else if (typeof define === "function" && define.amd) {
// AMD modules
define(function() { return Handlebars; });
} else {
// other, i.e. browser
this.Handlebars = Handlebars;
}
}).call(this);
; ;

View File

@ -1,7 +1,7 @@
/* jquery.signalR.core.js */ /* jquery.signalR.core.js */
/*global window:false */ /*global window:false */
/*! /*!
* ASP.NET SignalR JavaScript Library v1.1.1 * ASP.NET SignalR JavaScript Library v1.1.2
* http://signalr.net/ * http://signalr.net/
* *
* Copyright Microsoft Open Technologies, Inc. All rights reserved. * Copyright Microsoft Open Technologies, Inc. All rights reserved.
@ -2119,5 +2119,5 @@
/*global window:false */ /*global window:false */
/// <reference path="jquery.signalR.core.js" /> /// <reference path="jquery.signalR.core.js" />
(function ($) { (function ($) {
$.signalR.version = "1.1.1"; $.signalR.version = "1.1.2";
}(window.jQuery)); }(window.jQuery));