Support AMD and CommonJS out of the box
This commit is contained in:
@@ -1,3 +1,2 @@
|
||||
var Handlebars = {};
|
||||
|
||||
(function(Handlebars, undefined) {
|
||||
(function(undefined) {
|
||||
var Handlebars = {};
|
||||
|
||||
@@ -1 +1,13 @@
|
||||
})(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);
|
||||
|
||||
Reference in New Issue
Block a user