jscrambler
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -130,3 +130,11 @@ /** | ||
for (var i = 0, l = files.length; i < l; ++i) { | ||
zip.file(files[i], fs.readFileSync(files[i])); | ||
var buffer, name; | ||
if (files[i].contents) { | ||
name = path.relative(files[i].cwd, files[i].path); | ||
buffer = files[i].contents; | ||
} else { | ||
name = files[i]; | ||
buffer = fs.readFileSync(files[i]); | ||
} | ||
zip.file(name, buffer); | ||
} | ||
@@ -145,3 +153,7 @@ fs.outputFileSync('.tmp.zip', zip.generate(), {encoding: 'base64'}); | ||
var buffer = zip.file(file).asNodeBuffer(); | ||
fs.outputFileSync(path.join(dest, file), buffer); | ||
if (typeof dest === 'function') { | ||
dest(buffer, file); | ||
} else if (dest) { | ||
fs.outputFileSync(path.join(dest, file), buffer); | ||
} | ||
} | ||
@@ -148,0 +160,0 @@ } |
{ | ||
"name": "jscrambler", | ||
"description": "JScrambler API client.", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"homepage": "https://github.com/auditmark/node-jscrambler", | ||
@@ -6,0 +6,0 @@ "author": { |
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
19468
344