Fix build and unit tests by upgrading handlebars to 3.0.2
This commit is contained in:
parent
52dd9e1e61
commit
def6f54823
@ -18,7 +18,7 @@
|
|||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"commonmark": "~0.17.1",
|
"commonmark": "~0.17.1",
|
||||||
"handlebars": "~1.3.0",
|
"handlebars": "~3.0.2",
|
||||||
"marionette": "~2.3.1",
|
"marionette": "~2.3.1",
|
||||||
"normalize-scss": "~3.0.2",
|
"normalize-scss": "~3.0.2",
|
||||||
"prism": "git@github.com:LeaVerou/prism.git#gh-pages",
|
"prism": "git@github.com:LeaVerou/prism.git#gh-pages",
|
||||||
|
|||||||
10
package.json
10
package.json
@ -9,9 +9,9 @@
|
|||||||
"test": "grunt test"
|
"test": "grunt test"
|
||||||
},
|
},
|
||||||
"author": "Buddy Sandidge",
|
"author": "Buddy Sandidge",
|
||||||
"repository" : {
|
"repository": {
|
||||||
"type" : "git",
|
"type": "git",
|
||||||
"url" : "https://github.com/xbudex/phantom-talk.git"
|
"url": "https://github.com/xbudex/phantom-talk.git"
|
||||||
},
|
},
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@ -22,7 +22,7 @@
|
|||||||
"grunt-contrib-clean": "^0.6.0",
|
"grunt-contrib-clean": "^0.6.0",
|
||||||
"grunt-contrib-compass": "^1.0.1",
|
"grunt-contrib-compass": "^1.0.1",
|
||||||
"grunt-contrib-copy": "^0.7.0",
|
"grunt-contrib-copy": "^0.7.0",
|
||||||
"grunt-contrib-handlebars": "^0.9.3",
|
"grunt-contrib-handlebars": "^0.10.2",
|
||||||
"grunt-contrib-jshint": "^0.11.0",
|
"grunt-contrib-jshint": "^0.11.0",
|
||||||
"grunt-contrib-requirejs": "^0.4.4",
|
"grunt-contrib-requirejs": "^0.4.4",
|
||||||
"grunt-contrib-watch": "^0.6.1",
|
"grunt-contrib-watch": "^0.6.1",
|
||||||
@ -39,6 +39,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"async": "^0.9.0",
|
"async": "^0.9.0",
|
||||||
"express": "^4.11.2",
|
"express": "^4.11.2",
|
||||||
"handlebars": "^1.3.0"
|
"handlebars": "^3.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
vendor/handlebars/.bower.json
vendored
10
vendor/handlebars/.bower.json
vendored
@ -1,16 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "handlebars",
|
"name": "handlebars",
|
||||||
"version": "1.3.0",
|
"version": "3.0.2",
|
||||||
"main": "handlebars.js",
|
"main": "handlebars.js",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"homepage": "https://github.com/components/handlebars.js",
|
"homepage": "https://github.com/components/handlebars.js",
|
||||||
"_release": "1.3.0",
|
"_release": "3.0.2",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.3.0",
|
"tag": "v3.0.2",
|
||||||
"commit": "ddd21a44be399ae4de486ddd868bacf84e92b9c4"
|
"commit": "1ad00eb64322229a10067e1391fb3b46365d760b"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/components/handlebars.js.git",
|
"_source": "git://github.com/components/handlebars.js.git",
|
||||||
"_target": "~1.3.0",
|
"_target": "~3.0.2",
|
||||||
"_originalSource": "handlebars"
|
"_originalSource": "handlebars"
|
||||||
}
|
}
|
||||||
1
vendor/handlebars/README.md
vendored
1
vendor/handlebars/README.md
vendored
@ -9,3 +9,4 @@ Package Managers
|
|||||||
* [Bower](http://twitter.github.com/bower/): `handlebars`
|
* [Bower](http://twitter.github.com/bower/): `handlebars`
|
||||||
* [Component](http://github.com/component/component): `components/handlebars.js`
|
* [Component](http://github.com/component/component): `components/handlebars.js`
|
||||||
* [Composer](http://packagist.org/packages/components/handlebars.js): `components/handlebars.js`
|
* [Composer](http://packagist.org/packages/components/handlebars.js): `components/handlebars.js`
|
||||||
|
* [jspm](http://jspm.io): `github:components/handlebars.js`
|
||||||
|
|||||||
2
vendor/handlebars/bower.json
vendored
2
vendor/handlebars/bower.json
vendored
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "handlebars",
|
"name": "handlebars",
|
||||||
"version": "1.3.0",
|
"version": "3.0.2",
|
||||||
"main": "handlebars.js",
|
"main": "handlebars.js",
|
||||||
"dependencies": {}
|
"dependencies": {}
|
||||||
}
|
}
|
||||||
|
|||||||
3
vendor/handlebars/handlebars-source.gemspec
vendored
3
vendor/handlebars/handlebars-source.gemspec
vendored
@ -11,7 +11,8 @@ Gem::Specification.new do |gem|
|
|||||||
gem.description = %q{Handlebars.js source code wrapper for (pre)compilation gems.}
|
gem.description = %q{Handlebars.js source code wrapper for (pre)compilation gems.}
|
||||||
gem.summary = %q{Handlebars.js source code wrapper}
|
gem.summary = %q{Handlebars.js source code wrapper}
|
||||||
gem.homepage = "https://github.com/wycats/handlebars.js/"
|
gem.homepage = "https://github.com/wycats/handlebars.js/"
|
||||||
gem.version = package["version"]
|
gem.version = package["version"].sub "-", "."
|
||||||
|
gem.license = "MIT"
|
||||||
|
|
||||||
gem.files = [
|
gem.files = [
|
||||||
'handlebars.js',
|
'handlebars.js',
|
||||||
|
|||||||
3949
vendor/handlebars/handlebars.amd.js
vendored
3949
vendor/handlebars/handlebars.amd.js
vendored
File diff suppressed because one or more lines are too long
9
vendor/handlebars/handlebars.amd.min.js
vendored
9
vendor/handlebars/handlebars.amd.min.js
vendored
File diff suppressed because one or more lines are too long
5588
vendor/handlebars/handlebars.js
vendored
5588
vendor/handlebars/handlebars.js
vendored
File diff suppressed because one or more lines are too long
2
vendor/handlebars/handlebars.js.nuspec
vendored
2
vendor/handlebars/handlebars.js.nuspec
vendored
@ -2,7 +2,7 @@
|
|||||||
<package>
|
<package>
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>handlebars.js</id>
|
<id>handlebars.js</id>
|
||||||
<version>1.3.0</version>
|
<version>3.0.2</version>
|
||||||
<authors>handlebars.js Authors</authors>
|
<authors>handlebars.js Authors</authors>
|
||||||
<licenseUrl>https://github.com/wycats/handlebars.js/blob/master/LICENSE</licenseUrl>
|
<licenseUrl>https://github.com/wycats/handlebars.js/blob/master/LICENSE</licenseUrl>
|
||||||
<projectUrl>https://github.com/wycats/handlebars.js/</projectUrl>
|
<projectUrl>https://github.com/wycats/handlebars.js/</projectUrl>
|
||||||
|
|||||||
9
vendor/handlebars/handlebars.min.js
vendored
9
vendor/handlebars/handlebars.min.js
vendored
File diff suppressed because one or more lines are too long
712
vendor/handlebars/handlebars.runtime.amd.js
vendored
712
vendor/handlebars/handlebars.runtime.amd.js
vendored
@ -1,8 +1,8 @@
|
|||||||
/*!
|
/*!
|
||||||
|
|
||||||
handlebars v1.3.0
|
handlebars v3.0.2
|
||||||
|
|
||||||
Copyright (C) 2011 by Yehuda Katz
|
Copyright (C) 2011-2014 by Yehuda Katz
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -24,91 +24,105 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
@license
|
@license
|
||||||
*/
|
*/
|
||||||
|
define('handlebars/utils',['exports'], function (exports) {
|
||||||
|
|
||||||
define(
|
|
||||||
'handlebars/safe-string',["exports"],
|
|
||||||
function(__exports__) {
|
|
||||||
|
|
||||||
// Build out our basic SafeString type
|
exports.__esModule = true;
|
||||||
function SafeString(string) {
|
exports.extend = extend;
|
||||||
this.string = string;
|
|
||||||
}
|
|
||||||
|
|
||||||
SafeString.prototype.toString = function() {
|
|
||||||
return "" + this.string;
|
|
||||||
};
|
|
||||||
|
|
||||||
__exports__["default"] = SafeString;
|
|
||||||
});
|
|
||||||
define(
|
|
||||||
'handlebars/utils',["./safe-string","exports"],
|
|
||||||
function(__dependency1__, __exports__) {
|
|
||||||
|
|
||||||
|
// Older IE versions do not directly support indexOf so we must implement our own, sadly.
|
||||||
|
exports.indexOf = indexOf;
|
||||||
|
exports.escapeExpression = escapeExpression;
|
||||||
|
exports.isEmpty = isEmpty;
|
||||||
|
exports.blockParams = blockParams;
|
||||||
|
exports.appendContextPath = appendContextPath;
|
||||||
/*jshint -W004 */
|
/*jshint -W004 */
|
||||||
var SafeString = __dependency1__["default"];
|
|
||||||
|
|
||||||
var escape = {
|
var escape = {
|
||||||
"&": "&",
|
'&': '&',
|
||||||
"<": "<",
|
'<': '<',
|
||||||
">": ">",
|
'>': '>',
|
||||||
'"': """,
|
'"': '"',
|
||||||
"'": "'",
|
'\'': ''',
|
||||||
"`": "`"
|
'`': '`'
|
||||||
};
|
};
|
||||||
|
|
||||||
var badChars = /[&<>"'`]/g;
|
var badChars = /[&<>"'`]/g,
|
||||||
var possible = /[&<>"'`]/;
|
possible = /[&<>"'`]/;
|
||||||
|
|
||||||
function escapeChar(chr) {
|
function escapeChar(chr) {
|
||||||
return escape[chr] || "&";
|
return escape[chr];
|
||||||
}
|
}
|
||||||
|
|
||||||
function extend(obj, value) {
|
function extend(obj /* , ...source */) {
|
||||||
for(var key in value) {
|
for (var i = 1; i < arguments.length; i++) {
|
||||||
if(Object.prototype.hasOwnProperty.call(value, key)) {
|
for (var key in arguments[i]) {
|
||||||
obj[key] = value[key];
|
if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
|
||||||
|
obj[key] = arguments[i][key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__exports__.extend = extend;var toString = Object.prototype.toString;
|
return obj;
|
||||||
__exports__.toString = toString;
|
}
|
||||||
|
|
||||||
|
var toString = Object.prototype.toString;
|
||||||
|
|
||||||
|
exports.toString = toString;
|
||||||
// Sourced from lodash
|
// Sourced from lodash
|
||||||
// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
|
// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt
|
||||||
var isFunction = function(value) {
|
/*eslint-disable func-style, no-var */
|
||||||
|
var isFunction = function isFunction(value) {
|
||||||
return typeof value === 'function';
|
return typeof value === 'function';
|
||||||
};
|
};
|
||||||
// fallback for older versions of Chrome and Safari
|
// fallback for older versions of Chrome and Safari
|
||||||
|
/* istanbul ignore next */
|
||||||
if (isFunction(/x/)) {
|
if (isFunction(/x/)) {
|
||||||
isFunction = function(value) {
|
exports.isFunction = isFunction = function (value) {
|
||||||
return typeof value === 'function' && toString.call(value) === '[object Function]';
|
return typeof value === 'function' && toString.call(value) === '[object Function]';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
var isFunction;
|
var isFunction;
|
||||||
__exports__.isFunction = isFunction;
|
exports.isFunction = isFunction;
|
||||||
var isArray = Array.isArray || function(value) {
|
/*eslint-enable func-style, no-var */
|
||||||
return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false;
|
|
||||||
};
|
/* istanbul ignore next */
|
||||||
__exports__.isArray = isArray;
|
var isArray = Array.isArray || function (value) {
|
||||||
|
return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false;
|
||||||
|
};exports.isArray = isArray;
|
||||||
|
|
||||||
|
function indexOf(array, value) {
|
||||||
|
for (var i = 0, len = array.length; i < len; i++) {
|
||||||
|
if (array[i] === value) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
function escapeExpression(string) {
|
function escapeExpression(string) {
|
||||||
|
if (typeof string !== 'string') {
|
||||||
// don't escape SafeStrings, since they're already safe
|
// don't escape SafeStrings, since they're already safe
|
||||||
if (string instanceof SafeString) {
|
if (string && string.toHTML) {
|
||||||
return string.toString();
|
return string.toHTML();
|
||||||
} else if (!string && string !== 0) {
|
} else if (string == null) {
|
||||||
return "";
|
return '';
|
||||||
|
} else if (!string) {
|
||||||
|
return string + '';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Force a string conversion as this will be done by the append regardless and
|
// Force a string conversion as this will be done by the append regardless and
|
||||||
// the regex test will do this transparently behind the scenes, causing issues if
|
// the regex test will do this transparently behind the scenes, causing issues if
|
||||||
// an object's to string has escaped characters in it.
|
// an object's to string has escaped characters in it.
|
||||||
string = "" + string;
|
string = '' + string;
|
||||||
|
}
|
||||||
|
|
||||||
if(!possible.test(string)) { return string; }
|
if (!possible.test(string)) {
|
||||||
|
return string;
|
||||||
|
}
|
||||||
return string.replace(badChars, escapeChar);
|
return string.replace(badChars, escapeChar);
|
||||||
}
|
}
|
||||||
|
|
||||||
__exports__.escapeExpression = escapeExpression;function isEmpty(value) {
|
function isEmpty(value) {
|
||||||
if (!value && value !== 0) {
|
if (!value && value !== 0) {
|
||||||
return true;
|
return true;
|
||||||
} else if (isArray(value) && value.length === 0) {
|
} else if (isArray(value) && value.length === 0) {
|
||||||
@ -118,21 +132,29 @@ define(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__exports__.isEmpty = isEmpty;
|
function blockParams(params, ids) {
|
||||||
});
|
params.path = ids;
|
||||||
define(
|
return params;
|
||||||
'handlebars/exception',["exports"],
|
}
|
||||||
function(__exports__) {
|
|
||||||
|
function appendContextPath(contextPath, id) {
|
||||||
|
return (contextPath ? contextPath + '.' : '') + id;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
define('handlebars/exception',['exports', 'module'], function (exports, module) {
|
||||||
|
|
||||||
|
|
||||||
var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
|
var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
|
||||||
|
|
||||||
function Exception(message, node) {
|
function Exception(message, node) {
|
||||||
var line;
|
var loc = node && node.loc,
|
||||||
if (node && node.firstLine) {
|
line = undefined,
|
||||||
line = node.firstLine;
|
column = undefined;
|
||||||
|
if (loc) {
|
||||||
|
line = loc.start.line;
|
||||||
|
column = loc.start.column;
|
||||||
|
|
||||||
message += ' - ' + line + ':' + node.firstColumn;
|
message += ' - ' + line + ':' + column;
|
||||||
}
|
}
|
||||||
|
|
||||||
var tmp = Error.prototype.constructor.call(this, message);
|
var tmp = Error.prototype.constructor.call(this, message);
|
||||||
@ -142,36 +164,49 @@ define(
|
|||||||
this[errorProps[idx]] = tmp[errorProps[idx]];
|
this[errorProps[idx]] = tmp[errorProps[idx]];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (line) {
|
if (Error.captureStackTrace) {
|
||||||
|
Error.captureStackTrace(this, Exception);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (loc) {
|
||||||
this.lineNumber = line;
|
this.lineNumber = line;
|
||||||
this.column = node.firstColumn;
|
this.column = column;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Exception.prototype = new Error();
|
Exception.prototype = new Error();
|
||||||
|
|
||||||
__exports__["default"] = Exception;
|
module.exports = Exception;
|
||||||
});
|
});
|
||||||
define(
|
define('handlebars/base',['exports', './utils', './exception'], function (exports, _utils, _exception) {
|
||||||
'handlebars/base',["./utils","./exception","exports"],
|
|
||||||
function(__dependency1__, __dependency2__, __exports__) {
|
|
||||||
|
|
||||||
var Utils = __dependency1__;
|
|
||||||
var Exception = __dependency2__["default"];
|
|
||||||
|
|
||||||
var VERSION = "1.3.0";
|
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; };
|
||||||
__exports__.VERSION = VERSION;var COMPILER_REVISION = 4;
|
|
||||||
__exports__.COMPILER_REVISION = COMPILER_REVISION;
|
exports.__esModule = true;
|
||||||
|
exports.HandlebarsEnvironment = HandlebarsEnvironment;
|
||||||
|
exports.createFrame = createFrame;
|
||||||
|
|
||||||
|
var _Exception = _interopRequire(_exception);
|
||||||
|
|
||||||
|
var VERSION = '3.0.1';
|
||||||
|
exports.VERSION = VERSION;
|
||||||
|
var COMPILER_REVISION = 6;
|
||||||
|
|
||||||
|
exports.COMPILER_REVISION = COMPILER_REVISION;
|
||||||
var REVISION_CHANGES = {
|
var 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'
|
4: '== 1.x.x',
|
||||||
|
5: '== 2.0.0-alpha.x',
|
||||||
|
6: '>= 2.0.0-beta.1'
|
||||||
};
|
};
|
||||||
__exports__.REVISION_CHANGES = REVISION_CHANGES;
|
|
||||||
var isArray = Utils.isArray,
|
exports.REVISION_CHANGES = REVISION_CHANGES;
|
||||||
isFunction = Utils.isFunction,
|
var isArray = _utils.isArray,
|
||||||
toString = Utils.toString,
|
isFunction = _utils.isFunction,
|
||||||
|
toString = _utils.toString,
|
||||||
objectType = '[object Object]';
|
objectType = '[object Object]';
|
||||||
|
|
||||||
function HandlebarsEnvironment(helpers, partials) {
|
function HandlebarsEnvironment(helpers, partials) {
|
||||||
@ -181,128 +216,202 @@ define(
|
|||||||
registerDefaultHelpers(this);
|
registerDefaultHelpers(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
__exports__.HandlebarsEnvironment = HandlebarsEnvironment;HandlebarsEnvironment.prototype = {
|
HandlebarsEnvironment.prototype = {
|
||||||
constructor: HandlebarsEnvironment,
|
constructor: HandlebarsEnvironment,
|
||||||
|
|
||||||
logger: logger,
|
logger: logger,
|
||||||
log: log,
|
log: log,
|
||||||
|
|
||||||
registerHelper: function(name, fn, inverse) {
|
registerHelper: function registerHelper(name, fn) {
|
||||||
if (toString.call(name) === objectType) {
|
if (toString.call(name) === objectType) {
|
||||||
if (inverse || fn) { throw new Exception('Arg not supported with multiple helpers'); }
|
if (fn) {
|
||||||
Utils.extend(this.helpers, name);
|
throw new _Exception('Arg not supported with multiple helpers');
|
||||||
|
}
|
||||||
|
_utils.extend(this.helpers, name);
|
||||||
} else {
|
} else {
|
||||||
if (inverse) { fn.not = inverse; }
|
|
||||||
this.helpers[name] = fn;
|
this.helpers[name] = fn;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
unregisterHelper: function unregisterHelper(name) {
|
||||||
|
delete this.helpers[name];
|
||||||
|
},
|
||||||
|
|
||||||
registerPartial: function(name, str) {
|
registerPartial: function registerPartial(name, partial) {
|
||||||
if (toString.call(name) === objectType) {
|
if (toString.call(name) === objectType) {
|
||||||
Utils.extend(this.partials, name);
|
_utils.extend(this.partials, name);
|
||||||
} else {
|
} else {
|
||||||
this.partials[name] = str;
|
if (typeof partial === 'undefined') {
|
||||||
|
throw new _Exception('Attempting to register a partial as undefined');
|
||||||
}
|
}
|
||||||
|
this.partials[name] = partial;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
unregisterPartial: function unregisterPartial(name) {
|
||||||
|
delete this.partials[name];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function registerDefaultHelpers(instance) {
|
function registerDefaultHelpers(instance) {
|
||||||
instance.registerHelper('helperMissing', function(arg) {
|
instance.registerHelper('helperMissing', function () {
|
||||||
if(arguments.length === 2) {
|
if (arguments.length === 1) {
|
||||||
|
// A missing field in a {{foo}} constuct.
|
||||||
return undefined;
|
return undefined;
|
||||||
} else {
|
} else {
|
||||||
throw new Exception("Missing helper: '" + arg + "'");
|
// Someone is actually trying to call something, blow up.
|
||||||
|
throw new _Exception('Missing helper: "' + arguments[arguments.length - 1].name + '"');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
instance.registerHelper('blockHelperMissing', function(context, options) {
|
instance.registerHelper('blockHelperMissing', function (context, options) {
|
||||||
var inverse = options.inverse || function() {}, fn = options.fn;
|
var inverse = options.inverse,
|
||||||
|
fn = options.fn;
|
||||||
|
|
||||||
if (isFunction(context)) { context = context.call(this); }
|
if (context === true) {
|
||||||
|
|
||||||
if(context === true) {
|
|
||||||
return fn(this);
|
return fn(this);
|
||||||
} else if(context === false || context == null) {
|
} else if (context === false || context == null) {
|
||||||
return inverse(this);
|
return inverse(this);
|
||||||
} else if (isArray(context)) {
|
} else if (isArray(context)) {
|
||||||
if(context.length > 0) {
|
if (context.length > 0) {
|
||||||
|
if (options.ids) {
|
||||||
|
options.ids = [options.name];
|
||||||
|
}
|
||||||
|
|
||||||
return instance.helpers.each(context, options);
|
return instance.helpers.each(context, options);
|
||||||
} else {
|
} else {
|
||||||
return inverse(this);
|
return inverse(this);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return fn(context);
|
if (options.data && options.ids) {
|
||||||
|
var data = createFrame(options.data);
|
||||||
|
data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
|
||||||
|
options = { data: data };
|
||||||
|
}
|
||||||
|
|
||||||
|
return fn(context, options);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
instance.registerHelper('each', function(context, options) {
|
instance.registerHelper('each', function (context, options) {
|
||||||
var fn = options.fn, inverse = options.inverse;
|
if (!options) {
|
||||||
var i = 0, ret = "", data;
|
throw new _Exception('Must pass iterator to #each');
|
||||||
|
}
|
||||||
|
|
||||||
if (isFunction(context)) { context = context.call(this); }
|
var fn = options.fn,
|
||||||
|
inverse = options.inverse,
|
||||||
|
i = 0,
|
||||||
|
ret = '',
|
||||||
|
data = undefined,
|
||||||
|
contextPath = undefined;
|
||||||
|
|
||||||
|
if (options.data && options.ids) {
|
||||||
|
contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isFunction(context)) {
|
||||||
|
context = context.call(this);
|
||||||
|
}
|
||||||
|
|
||||||
if (options.data) {
|
if (options.data) {
|
||||||
data = createFrame(options.data);
|
data = createFrame(options.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(context && typeof context === 'object') {
|
function execIteration(field, index, last) {
|
||||||
if (isArray(context)) {
|
|
||||||
for(var j = context.length; i<j; i++) {
|
|
||||||
if (data) {
|
if (data) {
|
||||||
data.index = i;
|
data.key = field;
|
||||||
data.first = (i === 0);
|
data.index = index;
|
||||||
data.last = (i === (context.length-1));
|
data.first = index === 0;
|
||||||
|
data.last = !!last;
|
||||||
|
|
||||||
|
if (contextPath) {
|
||||||
|
data.contextPath = contextPath + field;
|
||||||
}
|
}
|
||||||
ret = ret + fn(context[i], { data: data });
|
}
|
||||||
|
|
||||||
|
ret = ret + fn(context[field], {
|
||||||
|
data: data,
|
||||||
|
blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (context && typeof context === 'object') {
|
||||||
|
if (isArray(context)) {
|
||||||
|
for (var j = context.length; i < j; i++) {
|
||||||
|
execIteration(i, i, i === context.length - 1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for(var key in context) {
|
var priorKey = undefined;
|
||||||
if(context.hasOwnProperty(key)) {
|
|
||||||
if(data) {
|
for (var key in context) {
|
||||||
data.key = key;
|
if (context.hasOwnProperty(key)) {
|
||||||
data.index = i;
|
// We're running the iterations one step out of sync so we can detect
|
||||||
data.first = (i === 0);
|
// the last iteration without have to scan the object twice and create
|
||||||
|
// an itermediate keys array.
|
||||||
|
if (priorKey) {
|
||||||
|
execIteration(priorKey, i - 1);
|
||||||
}
|
}
|
||||||
ret = ret + fn(context[key], {data: data});
|
priorKey = key;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (priorKey) {
|
||||||
|
execIteration(priorKey, i - 1, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(i === 0){
|
if (i === 0) {
|
||||||
ret = inverse(this);
|
ret = inverse(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
});
|
});
|
||||||
|
|
||||||
instance.registerHelper('if', function(conditional, options) {
|
instance.registerHelper('if', function (conditional, options) {
|
||||||
if (isFunction(conditional)) { conditional = conditional.call(this); }
|
if (isFunction(conditional)) {
|
||||||
|
conditional = conditional.call(this);
|
||||||
|
}
|
||||||
|
|
||||||
// Default behavior is to render the positive path if the value is truthy and not empty.
|
// Default behavior is to render the positive path if the value is truthy and not empty.
|
||||||
// The `includeZero` option may be set to treat the condtional as purely not empty based on the
|
// The `includeZero` option may be set to treat the condtional as purely not empty based on the
|
||||||
// behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
|
// behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative.
|
||||||
if ((!options.hash.includeZero && !conditional) || Utils.isEmpty(conditional)) {
|
if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {
|
||||||
return options.inverse(this);
|
return options.inverse(this);
|
||||||
} else {
|
} else {
|
||||||
return options.fn(this);
|
return options.fn(this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
instance.registerHelper('unless', function(conditional, options) {
|
instance.registerHelper('unless', function (conditional, options) {
|
||||||
return instance.helpers['if'].call(this, conditional, {fn: options.inverse, inverse: options.fn, hash: options.hash});
|
return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash });
|
||||||
});
|
});
|
||||||
|
|
||||||
instance.registerHelper('with', function(context, options) {
|
instance.registerHelper('with', function (context, options) {
|
||||||
if (isFunction(context)) { context = context.call(this); }
|
if (isFunction(context)) {
|
||||||
|
context = context.call(this);
|
||||||
|
}
|
||||||
|
|
||||||
if (!Utils.isEmpty(context)) return options.fn(context);
|
var fn = options.fn;
|
||||||
|
|
||||||
|
if (!_utils.isEmpty(context)) {
|
||||||
|
if (options.data && options.ids) {
|
||||||
|
var data = createFrame(options.data);
|
||||||
|
data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
|
||||||
|
options = { data: data };
|
||||||
|
}
|
||||||
|
|
||||||
|
return fn(context, options);
|
||||||
|
} else {
|
||||||
|
return options.inverse(this);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
instance.registerHelper('log', function(context, options) {
|
instance.registerHelper('log', function (message, options) {
|
||||||
var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;
|
var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1;
|
||||||
instance.log(level, context);
|
instance.log(level, message);
|
||||||
|
});
|
||||||
|
|
||||||
|
instance.registerHelper('lookup', function (obj, field) {
|
||||||
|
return obj && obj[field];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,202 +423,315 @@ define(
|
|||||||
INFO: 1,
|
INFO: 1,
|
||||||
WARN: 2,
|
WARN: 2,
|
||||||
ERROR: 3,
|
ERROR: 3,
|
||||||
level: 3,
|
level: 1,
|
||||||
|
|
||||||
// can be overridden in the host environment
|
// Can be overridden in the host environment
|
||||||
log: function(level, obj) {
|
log: function log(level, message) {
|
||||||
if (logger.level <= level) {
|
if (typeof console !== 'undefined' && logger.level <= level) {
|
||||||
var method = logger.methodMap[level];
|
var method = logger.methodMap[level];
|
||||||
if (typeof console !== 'undefined' && console[method]) {
|
(console[method] || console.log).call(console, message); // eslint-disable-line no-console
|
||||||
console[method].call(console, obj);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
__exports__.logger = logger;
|
|
||||||
function log(level, obj) { logger.log(level, obj); }
|
|
||||||
|
|
||||||
__exports__.log = log;var createFrame = function(object) {
|
exports.logger = logger;
|
||||||
var obj = {};
|
var log = logger.log;
|
||||||
Utils.extend(obj, object);
|
|
||||||
return obj;
|
exports.log = log;
|
||||||
|
|
||||||
|
function createFrame(object) {
|
||||||
|
var frame = _utils.extend({}, object);
|
||||||
|
frame._parent = object;
|
||||||
|
return frame;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
/* [args, ]options */;
|
||||||
|
define('handlebars/safe-string',['exports', 'module'], function (exports, module) {
|
||||||
|
// Build out our basic SafeString type
|
||||||
|
|
||||||
|
|
||||||
|
function SafeString(string) {
|
||||||
|
this.string = string;
|
||||||
|
}
|
||||||
|
|
||||||
|
SafeString.prototype.toString = SafeString.prototype.toHTML = function () {
|
||||||
|
return '' + this.string;
|
||||||
};
|
};
|
||||||
__exports__.createFrame = createFrame;
|
|
||||||
});
|
|
||||||
define(
|
|
||||||
'handlebars/runtime',["./utils","./exception","./base","exports"],
|
|
||||||
function(__dependency1__, __dependency2__, __dependency3__, __exports__) {
|
|
||||||
|
|
||||||
var Utils = __dependency1__;
|
module.exports = SafeString;
|
||||||
var Exception = __dependency2__["default"];
|
});
|
||||||
var COMPILER_REVISION = __dependency3__.COMPILER_REVISION;
|
define('handlebars/runtime',['exports', './utils', './exception', './base'], function (exports, _utils, _exception, _base) {
|
||||||
var REVISION_CHANGES = __dependency3__.REVISION_CHANGES;
|
|
||||||
|
|
||||||
|
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; };
|
||||||
|
|
||||||
|
exports.__esModule = true;
|
||||||
|
exports.checkRevision = checkRevision;
|
||||||
|
|
||||||
|
// TODO: Remove this line and break up compilePartial
|
||||||
|
|
||||||
|
exports.template = template;
|
||||||
|
exports.wrapProgram = wrapProgram;
|
||||||
|
exports.resolvePartial = resolvePartial;
|
||||||
|
exports.invokePartial = invokePartial;
|
||||||
|
exports.noop = noop;
|
||||||
|
|
||||||
|
var _Exception = _interopRequire(_exception);
|
||||||
|
|
||||||
function checkRevision(compilerInfo) {
|
function checkRevision(compilerInfo) {
|
||||||
var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
var compilerRevision = compilerInfo && compilerInfo[0] || 1,
|
||||||
currentRevision = COMPILER_REVISION;
|
currentRevision = _base.COMPILER_REVISION;
|
||||||
|
|
||||||
if (compilerRevision !== currentRevision) {
|
if (compilerRevision !== currentRevision) {
|
||||||
if (compilerRevision < currentRevision) {
|
if (compilerRevision < currentRevision) {
|
||||||
var runtimeVersions = REVISION_CHANGES[currentRevision],
|
var runtimeVersions = _base.REVISION_CHANGES[currentRevision],
|
||||||
compilerVersions = REVISION_CHANGES[compilerRevision];
|
compilerVersions = _base.REVISION_CHANGES[compilerRevision];
|
||||||
throw new Exception("Template was precompiled with an older version of Handlebars than the current runtime. "+
|
throw new _Exception('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').');
|
||||||
"Please update your precompiler to a newer version ("+runtimeVersions+") or downgrade your runtime to an older version ("+compilerVersions+").");
|
|
||||||
} else {
|
} else {
|
||||||
// Use the embedded version info since the runtime doesn't know about this revision yet
|
// Use the embedded version info since the runtime doesn't know about this revision yet
|
||||||
throw new Exception("Template was precompiled with a newer version of Handlebars than the current runtime. "+
|
throw new _Exception('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').');
|
||||||
"Please update your runtime to a newer version ("+compilerInfo[1]+").");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__exports__.checkRevision = checkRevision;// TODO: Remove this line and break up compilePartial
|
|
||||||
|
|
||||||
function template(templateSpec, env) {
|
function template(templateSpec, env) {
|
||||||
|
/* istanbul ignore next */
|
||||||
if (!env) {
|
if (!env) {
|
||||||
throw new Exception("No environment passed to template");
|
throw new _Exception('No environment passed to template');
|
||||||
|
}
|
||||||
|
if (!templateSpec || !templateSpec.main) {
|
||||||
|
throw new _Exception('Unknown template object: ' + typeof templateSpec);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: Using env.VM references rather than local var references throughout this section to allow
|
// Note: Using env.VM references rather than local var references throughout this section to allow
|
||||||
// for external users to override these as psuedo-supported APIs.
|
// for external users to override these as psuedo-supported APIs.
|
||||||
var invokePartialWrapper = function(partial, name, context, helpers, partials, data) {
|
env.VM.checkRevision(templateSpec.compiler);
|
||||||
var result = env.VM.invokePartial.apply(this, arguments);
|
|
||||||
if (result != null) { return result; }
|
|
||||||
|
|
||||||
if (env.compile) {
|
function invokePartialWrapper(partial, context, options) {
|
||||||
var options = { helpers: helpers, partials: partials, data: data };
|
if (options.hash) {
|
||||||
partials[name] = env.compile(partial, { data: data !== undefined }, env);
|
context = _utils.extend({}, context, options.hash);
|
||||||
return partials[name](context, options);
|
}
|
||||||
} else {
|
|
||||||
throw new Exception("The partial " + name + " could not be compiled when running in runtime-only mode");
|
partial = env.VM.resolvePartial.call(this, partial, context, options);
|
||||||
|
var result = env.VM.invokePartial.call(this, partial, context, options);
|
||||||
|
|
||||||
|
if (result == null && env.compile) {
|
||||||
|
options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
|
||||||
|
result = options.partials[options.name](context, options);
|
||||||
|
}
|
||||||
|
if (result != null) {
|
||||||
|
if (options.indent) {
|
||||||
|
var lines = result.split('\n');
|
||||||
|
for (var i = 0, l = lines.length; i < l; i++) {
|
||||||
|
if (!lines[i] && i + 1 === l) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
lines[i] = options.indent + lines[i];
|
||||||
|
}
|
||||||
|
result = lines.join('\n');
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
} else {
|
||||||
|
throw new _Exception('The partial ' + options.name + ' could not be compiled when running in runtime-only mode');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
|
||||||
// Just add water
|
// Just add water
|
||||||
var container = {
|
var container = {
|
||||||
escapeExpression: Utils.escapeExpression,
|
strict: function strict(obj, name) {
|
||||||
|
if (!(name in obj)) {
|
||||||
|
throw new _Exception('"' + name + '" not defined in ' + obj);
|
||||||
|
}
|
||||||
|
return obj[name];
|
||||||
|
},
|
||||||
|
lookup: function lookup(depths, name) {
|
||||||
|
var len = depths.length;
|
||||||
|
for (var i = 0; i < len; i++) {
|
||||||
|
if (depths[i] && depths[i][name] != null) {
|
||||||
|
return depths[i][name];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
lambda: function lambda(current, context) {
|
||||||
|
return typeof current === 'function' ? current.call(context) : current;
|
||||||
|
},
|
||||||
|
|
||||||
|
escapeExpression: _utils.escapeExpression,
|
||||||
invokePartial: invokePartialWrapper,
|
invokePartial: invokePartialWrapper,
|
||||||
|
|
||||||
|
fn: function fn(i) {
|
||||||
|
return templateSpec[i];
|
||||||
|
},
|
||||||
|
|
||||||
programs: [],
|
programs: [],
|
||||||
program: function(i, fn, data) {
|
program: function program(i, data, declaredBlockParams, blockParams, depths) {
|
||||||
var programWrapper = this.programs[i];
|
var programWrapper = this.programs[i],
|
||||||
if(data) {
|
fn = this.fn(i);
|
||||||
programWrapper = program(i, fn, data);
|
if (data || depths || blockParams || declaredBlockParams) {
|
||||||
|
programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
|
||||||
} else if (!programWrapper) {
|
} else if (!programWrapper) {
|
||||||
programWrapper = this.programs[i] = program(i, fn);
|
programWrapper = this.programs[i] = wrapProgram(this, i, fn);
|
||||||
}
|
}
|
||||||
return programWrapper;
|
return programWrapper;
|
||||||
},
|
},
|
||||||
merge: function(param, common) {
|
|
||||||
var ret = param || common;
|
|
||||||
|
|
||||||
if (param && common && (param !== common)) {
|
data: function data(value, depth) {
|
||||||
ret = {};
|
while (value && depth--) {
|
||||||
Utils.extend(ret, common);
|
value = value._parent;
|
||||||
Utils.extend(ret, param);
|
|
||||||
}
|
}
|
||||||
return ret;
|
return value;
|
||||||
},
|
},
|
||||||
programWithDepth: env.VM.programWithDepth,
|
merge: function merge(param, common) {
|
||||||
|
var obj = param || common;
|
||||||
|
|
||||||
|
if (param && common && param !== common) {
|
||||||
|
obj = _utils.extend({}, common, param);
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
},
|
||||||
|
|
||||||
noop: env.VM.noop,
|
noop: env.VM.noop,
|
||||||
compilerInfo: null
|
compilerInfo: templateSpec.compiler
|
||||||
};
|
};
|
||||||
|
|
||||||
return function(context, options) {
|
function ret(context) {
|
||||||
options = options || {};
|
var options = arguments[1] === undefined ? {} : arguments[1];
|
||||||
var namespace = options.partial ? options : env,
|
|
||||||
helpers,
|
|
||||||
partials;
|
|
||||||
|
|
||||||
|
var data = options.data;
|
||||||
|
|
||||||
|
ret._setup(options);
|
||||||
|
if (!options.partial && templateSpec.useData) {
|
||||||
|
data = initData(context, data);
|
||||||
|
}
|
||||||
|
var depths = undefined,
|
||||||
|
blockParams = templateSpec.useBlockParams ? [] : undefined;
|
||||||
|
if (templateSpec.useDepths) {
|
||||||
|
depths = options.depths ? [context].concat(options.depths) : [context];
|
||||||
|
}
|
||||||
|
|
||||||
|
return templateSpec.main.call(container, context, container.helpers, container.partials, data, blockParams, depths);
|
||||||
|
}
|
||||||
|
ret.isTop = true;
|
||||||
|
|
||||||
|
ret._setup = function (options) {
|
||||||
if (!options.partial) {
|
if (!options.partial) {
|
||||||
helpers = options.helpers;
|
container.helpers = container.merge(options.helpers, env.helpers);
|
||||||
partials = options.partials;
|
|
||||||
}
|
|
||||||
var result = templateSpec.call(
|
|
||||||
container,
|
|
||||||
namespace, context,
|
|
||||||
helpers,
|
|
||||||
partials,
|
|
||||||
options.data);
|
|
||||||
|
|
||||||
if (!options.partial) {
|
if (templateSpec.usePartial) {
|
||||||
env.VM.checkRevision(container.compilerInfo);
|
container.partials = container.merge(options.partials, env.partials);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
container.helpers = options.helpers;
|
||||||
|
container.partials = options.partials;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ret._child = function (i, data, blockParams, depths) {
|
||||||
|
if (templateSpec.useBlockParams && !blockParams) {
|
||||||
|
throw new _Exception('must pass block params');
|
||||||
|
}
|
||||||
|
if (templateSpec.useDepths && !depths) {
|
||||||
|
throw new _Exception('must pass parent depths');
|
||||||
}
|
}
|
||||||
|
|
||||||
__exports__.template = template;function programWithDepth(i, fn, data /*, $depth */) {
|
return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
|
||||||
var args = Array.prototype.slice.call(arguments, 3);
|
|
||||||
|
|
||||||
var prog = function(context, options) {
|
|
||||||
options = options || {};
|
|
||||||
|
|
||||||
return fn.apply(this, [context, options.data || data].concat(args));
|
|
||||||
};
|
};
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
|
||||||
|
function prog(context) {
|
||||||
|
var options = arguments[1] === undefined ? {} : arguments[1];
|
||||||
|
|
||||||
|
return fn.call(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), depths && [context].concat(depths));
|
||||||
|
}
|
||||||
prog.program = i;
|
prog.program = i;
|
||||||
prog.depth = args.length;
|
prog.depth = depths ? depths.length : 0;
|
||||||
|
prog.blockParams = declaredBlockParams || 0;
|
||||||
return prog;
|
return prog;
|
||||||
}
|
}
|
||||||
|
|
||||||
__exports__.programWithDepth = programWithDepth;function program(i, fn, data) {
|
function resolvePartial(partial, context, options) {
|
||||||
var prog = function(context, options) {
|
if (!partial) {
|
||||||
options = options || {};
|
partial = options.partials[options.name];
|
||||||
|
} else if (!partial.call && !options.name) {
|
||||||
return fn(context, options.data || data);
|
// This is a dynamic partial that returned a string
|
||||||
};
|
options.name = partial;
|
||||||
prog.program = i;
|
partial = options.partials[partial];
|
||||||
prog.depth = 0;
|
}
|
||||||
return prog;
|
return partial;
|
||||||
}
|
}
|
||||||
|
|
||||||
__exports__.program = program;function invokePartial(partial, name, context, helpers, partials, data) {
|
function invokePartial(partial, context, options) {
|
||||||
var options = { partial: true, helpers: helpers, partials: partials, data: data };
|
options.partial = true;
|
||||||
|
|
||||||
if(partial === undefined) {
|
if (partial === undefined) {
|
||||||
throw new Exception("The partial " + name + " could not be found");
|
throw new _Exception('The partial ' + options.name + ' could not be found');
|
||||||
} else if(partial instanceof Function) {
|
} else if (partial instanceof Function) {
|
||||||
return partial(context, options);
|
return partial(context, options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__exports__.invokePartial = invokePartial;function noop() { return ""; }
|
function noop() {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
__exports__.noop = noop;
|
function initData(context, data) {
|
||||||
});
|
if (!data || !('root' in data)) {
|
||||||
define(
|
data = data ? _base.createFrame(data) : {};
|
||||||
'handlebars.runtime',["./handlebars/base","./handlebars/safe-string","./handlebars/exception","./handlebars/utils","./handlebars/runtime","exports"],
|
data.root = context;
|
||||||
function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __exports__) {
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
define('handlebars.runtime',['exports', 'module', './handlebars/base', './handlebars/safe-string', './handlebars/exception', './handlebars/utils', './handlebars/runtime'], function (exports, module, _handlebarsBase, _handlebarsSafeString, _handlebarsException, _handlebarsUtils, _handlebarsRuntime) {
|
||||||
|
|
||||||
/*globals Handlebars: true */
|
|
||||||
var base = __dependency1__;
|
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; };
|
||||||
|
|
||||||
// Each of these augment the Handlebars object. No need to setup here.
|
// Each of these augment the Handlebars object. No need to setup here.
|
||||||
// (This is done to easily share code between commonjs and browse envs)
|
// (This is done to easily share code between commonjs and browse envs)
|
||||||
var SafeString = __dependency2__["default"];
|
|
||||||
var Exception = __dependency3__["default"];
|
var _SafeString = _interopRequire(_handlebarsSafeString);
|
||||||
var Utils = __dependency4__;
|
|
||||||
var runtime = __dependency5__;
|
var _Exception = _interopRequire(_handlebarsException);
|
||||||
|
|
||||||
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
|
// For compatibility and usage outside of module systems, make the Handlebars object a namespace
|
||||||
var create = function() {
|
function create() {
|
||||||
var hb = new base.HandlebarsEnvironment();
|
var hb = new _handlebarsBase.HandlebarsEnvironment();
|
||||||
|
|
||||||
Utils.extend(hb, base);
|
_handlebarsUtils.extend(hb, _handlebarsBase);
|
||||||
hb.SafeString = SafeString;
|
hb.SafeString = _SafeString;
|
||||||
hb.Exception = Exception;
|
hb.Exception = _Exception;
|
||||||
hb.Utils = Utils;
|
hb.Utils = _handlebarsUtils;
|
||||||
|
hb.escapeExpression = _handlebarsUtils.escapeExpression;
|
||||||
|
|
||||||
hb.VM = runtime;
|
hb.VM = _handlebarsRuntime;
|
||||||
hb.template = function(spec) {
|
hb.template = function (spec) {
|
||||||
return runtime.template(spec, hb);
|
return _handlebarsRuntime.template(spec, hb);
|
||||||
};
|
};
|
||||||
|
|
||||||
return hb;
|
return hb;
|
||||||
};
|
}
|
||||||
|
|
||||||
var Handlebars = create();
|
var Handlebars = create();
|
||||||
Handlebars.create = create;
|
Handlebars.create = create;
|
||||||
|
|
||||||
__exports__["default"] = Handlebars;
|
/*jshint -W040 */
|
||||||
});
|
/* istanbul ignore next */
|
||||||
|
var root = typeof global !== 'undefined' ? global : window,
|
||||||
|
$Handlebars = root.Handlebars;
|
||||||
|
/* istanbul ignore next */
|
||||||
|
Handlebars.noConflict = function () {
|
||||||
|
if (root.Handlebars === Handlebars) {
|
||||||
|
root.Handlebars = $Handlebars;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Handlebars['default'] = Handlebars;
|
||||||
|
|
||||||
|
module.exports = Handlebars;
|
||||||
|
});
|
||||||
|
/*global window */;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
963
vendor/handlebars/handlebars.runtime.js
vendored
963
vendor/handlebars/handlebars.runtime.js
vendored
File diff suppressed because it is too large
Load Diff
6
vendor/handlebars/handlebars.runtime.min.js
vendored
6
vendor/handlebars/handlebars.runtime.min.js
vendored
File diff suppressed because one or more lines are too long
8
vendor/handlebars/package.json
vendored
Normal file
8
vendor/handlebars/package.json
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"jspm": {
|
||||||
|
"main": "handlebars",
|
||||||
|
"shim": { "handlebars": { "exports": "Handlebars" } },
|
||||||
|
"files": ["handlebars.js"],
|
||||||
|
"buildConfig": { "minify": true }
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user