Przeglądaj źródła

Merge pull request #378 from jrburke/umd-fix

Fixes AMD registration, volo package.json entry
tags/v1.0.0
Michael Jackson 12 lat temu
rodzic
commit
32db14a490
2 zmienionych plików z 4 dodań i 6 usunięć
  1. +3
    -5
      mustache.js
  2. +1
    -1
      package.json

+ 3
- 5
mustache.js Wyświetl plik

@@ -9,9 +9,9 @@
if (typeof exports === "object" && exports) { if (typeof exports === "object" && exports) {
factory(exports); // CommonJS factory(exports); // CommonJS
} else if (typeof define === "function" && define.amd) { } else if (typeof define === "function" && define.amd) {
define(factory({})); // AMD
define(['exports'], factory); // AMD
} else { } else {
global.Mustache = factory({}); // <script>
factory(global.Mustache = {}); // <script>
} }
}(this, function (mustache) { }(this, function (mustache) {


@@ -39,7 +39,7 @@
function isWhitespace(string) { function isWhitespace(string) {
return !testRegExp(nonSpaceRe, string); return !testRegExp(nonSpaceRe, string);
} }
var entityMap = { var entityMap = {
"&": "&amp;", "&": "&amp;",
"<": "&lt;", "<": "&lt;",
@@ -575,6 +575,4 @@
mustache.Context = Context; mustache.Context = Context;
mustache.Writer = Writer; mustache.Writer = Writer;


return mustache;

})); }));

+ 1
- 1
package.json Wyświetl plik

@@ -13,7 +13,7 @@
"mocha": "1.5.0" "mocha": "1.5.0"
}, },
"volo": { "volo": {
"url": "https://raw.github.com/janl/mustache.js/0.7.3/mustache.js"
"url": "https://raw.github.com/janl/mustache.js/{version}/mustache.js"
}, },
"scripts": { "scripts": {
"test": "mocha test" "test": "mocha test"


Ładowanie…
Anuluj
Zapisz