Procházet zdrojové kódy

Add AMD module support

tags/0.5.2
Michael Jackson před 14 roky
rodič
revize
33920ad674
4 změnil soubory, kde provedl 14 přidání a 12 odebrání
  1. +0
    -1
      Rakefile
  2. +14
    -2
      mustache.js
  3. +0
    -3
      wrappers/requirejs/mustache.js.post
  4. +0
    -6
      wrappers/requirejs/mustache.js.pre

+ 0
- 1
Rakefile Zobrazit soubor

@@ -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"

+ 14
- 2
mustache.js Zobrazit soubor

@@ -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; // <script>
}
}(function () {
var exports = {};

exports.name = "mustache.js";
exports.version = "0.5.1-dev";
@@ -598,4 +608,6 @@ var Mustache = (typeof module !== "undefined" && module.exports) || {};
return _renderer.render(template, view);
}

})(Mustache);
return exports;

}()));

+ 0
- 3
wrappers/requirejs/mustache.js.post Zobrazit soubor

@@ -1,3 +0,0 @@

return Mustache;
});

+ 0
- 6
wrappers/requirejs/mustache.js.pre Zobrazit soubor

@@ -1,6 +0,0 @@
/*
Shameless port of a shameless port ^ 2
@defunkt => @janl => @aq => @voodootikigod => @timruffles
*/
define(function(){

Načítá se…
Zrušit
Uložit