Permalink
Browse files

update min version

  • Loading branch information...
1 parent 289d913 commit df18a45d34d4f108cd708771679d720fd3a584ab @ben-lin ben-lin committed Dec 19, 2013
Showing with 10 additions and 2 deletions.
  1. +10 −2 thunder.min.js
View
12 thunder.min.js
@@ -1,9 +1,17 @@
-/*
+/*!
* thunder
* Copyright(c) 2012 dreamerslab <ben@dreamerslab.com>
* MIT Licensed
*
* @fileoverview
* A lightning fast JavaScript template engine.
*/
-;(function(a){var b={};var c={rules:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"},fn:function(e){return typeof(e)!="string"?e:e.replace(/[&<>"]/g,function(f){return c.rules[f];});}};var d={version:"0.1.7",compiled_text:function(f,h){var e=(h&&h.compress===true?f.replace(/\n\r\t|\s+/g," "):f.replace(/\n\r|\r/g,"\n")).split("<?").join("?>\x1b").split("?>");var m="";var l=0;var g=e.length;var k="";for(;l<g;l++){k=e[l];m+=k.charAt(0)!="\x1b"?"__t__+='"+k.replace(/\'|\\/g,"\\$&").replace(/\n/g,"\\n\\\n")+"'":(k.charAt(1)=="="?";__t__+="+k.substr(2)+";":(k.charAt(1)=="-"?";__t__+=e("+k.substr(2)+");":";"+k.substr(1)));}return('var __t__="";'+m+";return __t__;").replace(/__t__\+\=\'\'\;/g,"").replace(/var __t__\=\"\"\;__t__\+\=/g,"var __t__=");},compile:function(e,f){var i=this.compiled_text(e,f);var g;try{g=new Function("it","e",i);}catch(h){console.log("[thunder] Having trouble with creating a template function: \n"+i);throw h;}return function(j){return g(j,c.fn);};},cached:function(e,f,g){g=g||e;if(!b[g]){b[g]=this.compile(e,f);}return b[g];},render:function(e,g,f){var h=f&&f.cached===true?"cached":"compile";return this[h](e,f)(g);},clear:function(){b={};}};if(typeof define!=="undefined"){return define(function(f,e,g){g.exports=d;});}if(typeof exports==="undefined"){a.thunder=d;return;}module.exports=d;})(this);
+(function(a){var b={};
+var c={rules:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"},fn:function(e){return typeof(e)!="string"?e:e.replace(/[&<>"]/g,function(f){return c.rules[f];
+});}};var d={version:"0.1.12",settings:{open:"<?",close:"?>"},compiled_text:function(f,h){f=f.replace(/\s*<!\[CDATA\[\s*|\s*\]\]>\s*/g,"\n");var e=(h&&h.compress===true?f.replace(/\n\r\t|\s+/g," "):f.replace(/\n\r|\r/g,"\n")).split(d.settings.open).join(d.settings.close+"\x1b").split(d.settings.close);
+var m="";var l=0;var g=e.length;var k="";for(;l<g;l++){k=e[l];m+=k.charAt(0)!="\x1b"?"_buf+='"+k.replace(/(\\|[\"\'])/g,"\\$1").replace(/\n/g,"\\n\\\n")+"'":(k.charAt(1)=="="?";_buf+="+k.substr(2).replace(/[\;\s]+$/,"")+";":(k.charAt(1)=="-"?";_buf+=e("+k.substr(2).replace(/[\;\s]+$/,"")+");":";"+k.substr(1).replace(/^\s+|\s+$/g,"").replace(/[\w\'\"\)\$]$/,"$&;")));
+}return('var _buf="";'+m+";return _buf;").replace(/_buf\+\=\'\'\;/g,"").replace(/var _buf\=\"\"\;_buf\+\=/g,"var _buf=");},compile:function(e,f){var i=d.compiled_text(e,f);
+var g;try{g=new Function("it","e",i);}catch(h){console.log("[thunder] Having trouble with creating a template function: \n"+i);throw h;}return function(j){return g(j,c.fn);
+};},cached:function(e,f,g){g=g||e;if(!b[g]){b[g]=d.compile(e,f);}return b[g];},render:function(e,g,f){var h=f&&f.cached===true?"cached":"compile";return d[h](e,f)(g);
+},clear:function(){b={};}};if(typeof define!=="undefined"){return define(function(f,e,g){g.exports=d;});}if(typeof exports==="undefined"){a.thunder=d;return;
+}module.exports=d;})(this);

0 comments on commit df18a45

Please sign in to comment.