Comparing version 0.5.6 to 0.5.7
@@ -42,3 +42,3 @@ var helper = require("../lib/util"); | ||
return "function(_, _method){" + | ||
return "function(_,_method){" + | ||
"_method=_method||{};" + | ||
@@ -50,14 +50,22 @@ "_method.__throw=function(e){throw(e)};" + | ||
var result = ''; | ||
var wrapper = param.define; | ||
var packageName = helper.filteredUrl(_url, param.filter); | ||
var result = ''; | ||
var anonymous = param.anonymous; | ||
var packageName = '"' + helper.filteredUrl(_url, param.filter) + '"'; | ||
if (!wrapper || "string" !== typeof wrapper || !!~["window", "global", "self", "parent", "Window", "Global"].indexOf(wrapper)) { | ||
result = "window[\"" + packageName + "\"]=" + compiled; | ||
if (wrapper) { | ||
if (anonymous) { | ||
result = wrapper + "(function(){return " + compiled + "});"; | ||
} | ||
else { | ||
result = wrapper + '(' + packageName + ",function(){return " + compiled + "});"; | ||
} | ||
} | ||
else if (param.anonymous) { | ||
result = wrapper + "(function(){return " + compiled + "});"; | ||
} | ||
else { | ||
result = wrapper + "(\"" + packageName + "\",function(){return " + compiled + "});"; | ||
if (anonymous) { | ||
result = "module.exports=" + compiled; | ||
} | ||
else { | ||
result = "window[" + packageName + "]=" + compiled; | ||
} | ||
} | ||
@@ -64,0 +72,0 @@ |
{ | ||
"name": "dac", | ||
"version": "0.5.6", | ||
"version": "0.5.7", | ||
"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
6591
174