diff --git a/Rakefile b/Rakefile index a1c7920..bc32175 100644 --- a/Rakefile +++ b/Rakefile @@ -65,5 +65,4 @@ templated_build "jQuery" templated_build "MooTools" templated_build "Dojo", :location => "dojox/string" templated_build "YUI3", :location => "yui3/mustache" -templated_build "RequireJS" templated_build "qooxdoo" diff --git a/mustache.js b/mustache.js index f45009a..c6b6c6b 100644 --- a/mustache.js +++ b/mustache.js @@ -2,9 +2,19 @@ * mustache.js - Logic-less {{mustache}} templates with JavaScript * http://github.com/janl/mustache.js */ -var Mustache = (typeof module !== "undefined" && module.exports) || {}; + +var Mustache; (function (exports) { + if (typeof module !== "undefined") { + module.exports = exports; // CommonJS + } else if (typeof define === "function") { + define(exports); // AMD + } else { + Mustache = exports; //