Comparing version 0.5.10 to 0.6.0
@@ -18,2 +18,11 @@ var helper = require("../lib/util"); | ||
var _method = [ | ||
"_method=_method||{};", | ||
"_method.__throw=function(e){throw(e)};" | ||
]; | ||
tpl = tpl.replace(/\{@helper\s{1,}([^\}]*?)\}([\s\S]*?)\{@\/helper\}/igm, function (all, funcname, func) { | ||
_method.push("_method." + funcname + '=' + func.replace(/^\s{0,}\n{1,}\s{0,}|\s{0,}\n{1,}\s{0,}$/g, '') + ';'); | ||
return ''; | ||
}); | ||
var compiled = juicer(tpl)._render.toString().replace(/^function anonymous[^{]*?{\n?([\s\S]*?)\n?}$/img, function ($, fn_body) { | ||
@@ -44,4 +53,3 @@ fn_body = fn_body.replace(/(['"])use strict\1;?\n?/g, ''); | ||
return "function(_,_method){" + | ||
"_method=_method||{};" + | ||
"_method.__throw=function(e){throw(e)};" + | ||
_method.join('') + | ||
(flag ? ("_method.__escapehtml={" + escapehtml.join(',') + "};") : '') + | ||
@@ -48,0 +56,0 @@ fn_body + "};"; |
{ | ||
"name": "dac", | ||
"version": "0.5.10", | ||
"version": "0.6.0", | ||
"description": "Dynamic Assets Compiler", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6890
181