Skip to content

Commit

Permalink
Merge pull request janl#283 from busticated/amdwrapper
Browse files Browse the repository at this point in the history
clean up and standardize UMD wrapper
  • Loading branch information
mjackson committed Dec 20, 2012
2 parents 4474099 + d90d37f commit 4e30d03
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions mustache.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@

/*global define: false*/

var Mustache;

(function (exports) {
if (typeof module !== "undefined" && module.exports) {
module.exports = exports; // CommonJS
} else if (typeof define === "function") {
define(exports); // AMD
(function (root, factory) {
if (typeof exports === "object" && exports) {
module.exports = factory; // CommonJS
} else if (typeof define === "function" && define.amd) {
define(factory); // AMD
} else {
Mustache = exports; // <script>
root.Mustache = factory; // <script>
}
}((function () {
}(this, (function () {

var exports = {};

Expand Down

0 comments on commit 4e30d03

Please sign in to comment.