Skip to content

Commit a1ccd4d

Browse files
author
Mathieu Cote
committed
Patch for requireJS
1 parent 587fd7c commit a1ccd4d

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

js/tmpl.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/*jslint evil: true, regexp: true, unparam: true */
1616
/*global document, define */
1717

18-
(function ($) {
18+
(function (w) {
1919
"use strict";
2020
var tmpl = function (str, data) {
2121
var f = !/[^\w\-\.:]/.test(str) ? tmpl.cache[str] = tmpl.cache[str] ||
@@ -77,11 +77,7 @@
7777
tmpl.arg = "o";
7878
tmpl.helper = ",print=function(s,e){_s+=e?(s==null?'':s):_e(s);}" +
7979
",include=function(s,d){_s+=tmpl(s,d);}";
80-
if (typeof define === "function" && define.amd) {
81-
define(function () {
82-
return tmpl;
83-
});
84-
} else {
85-
$.tmpl = tmpl;
86-
}
87-
}(this));
80+
81+
w["tmpl"] = tmpl;
82+
83+
})(window);

0 commit comments

Comments
 (0)