Comparing version 0.5.8 to 0.5.9
@@ -19,5 +19,6 @@ var helper = require("../lib/util"); | ||
var compiled = juicer(tpl)._render.toString().replace(/^function anonymous[^{]*?{\n?([\s\S]*?)\n?}$/img, function ($, fn_body) { | ||
fn_body = fn_body.replace(/(['"])use strict\1;?\n?/g, ''); | ||
fn_body = fn_body.replace(/\s{0,}\'\s{0,}/g, "'"); | ||
fn_body = fn_body.replace(/>\s{1,}</g, "><"); | ||
fn_body = fn_body | ||
.replace(/(['"])use strict\1;?\n?/g, '') | ||
.replace(/\s{0,}\';/g, "';").replace(/=\'\s{0,}/g, "='") | ||
.replace(/>\s{1,}</g, "><"); | ||
@@ -58,13 +59,16 @@ var escapehtml = [], flag = false; | ||
if (wrapper) { | ||
result = wrapper + '('; | ||
if (!anonymous) { | ||
result += packageName + ','; | ||
} | ||
if (wrapper == "define") { | ||
result = "define(function(require,exports,module){module.exports=" + compiled + "});"; | ||
result += "function(require,exports,module){module.exports="; | ||
} | ||
else { | ||
if (anonymous) { | ||
result = wrapper + "(function(){return " + compiled + "});"; | ||
} | ||
else { | ||
result = wrapper + '(' + packageName + ",function(){return " + compiled + "});"; | ||
} | ||
result += "function(){return "; | ||
} | ||
result += compiled + "});"; | ||
} | ||
@@ -71,0 +75,0 @@ else { |
{ | ||
"name": "dac", | ||
"version": "0.5.8", | ||
"version": "0.5.9", | ||
"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
177
6698