Comparing version 3.0.2 to 3.0.3
@@ -12,2 +12,3 @@ #!/usr/bin/env node | ||
const os = require('os') | ||
const isBinaryFile = require('isbinaryfile') | ||
@@ -59,7 +60,18 @@ module.exports = generify | ||
function copyAndReplace (source, dest) { | ||
pump( | ||
fs.createReadStream(source), | ||
split(replaceLine), | ||
fs.createWriteStream(dest), | ||
complete) | ||
isBinaryFile(source, function (err, isBinary) { | ||
if (err) return complete(err) | ||
if (isBinary) { | ||
pump( | ||
fs.createReadStream(source), | ||
fs.createWriteStream(dest), | ||
complete) | ||
} else { | ||
pump( | ||
fs.createReadStream(source), | ||
split(replaceLine), | ||
fs.createWriteStream(dest), | ||
complete) | ||
} | ||
}) | ||
} | ||
@@ -66,0 +78,0 @@ |
{ | ||
"name": "generify", | ||
"version": "3.0.2", | ||
"version": "3.0.3", | ||
"description": "A reusable project generator", | ||
@@ -30,8 +30,9 @@ "main": "generify.js", | ||
"pre-commit": "^1.2.2", | ||
"rimraf": "^2.2.8", | ||
"snazzy": "^7.1.1", | ||
"standard": "^11.0.0", | ||
"tap": "^12.0.0" | ||
"rimraf": "^2.6.3", | ||
"snazzy": "^8.0.0", | ||
"standard": "^12.0.1", | ||
"tap": "^12.5.3" | ||
}, | ||
"dependencies": { | ||
"isbinaryfile": "^3.0.2", | ||
"mkdirp": "^0.5.0", | ||
@@ -38,0 +39,0 @@ "pump": "^3.0.0", |
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
16387
20
261
5
+ Addedisbinaryfile@^3.0.2
+ Addedbuffer-alloc@1.2.0(transitive)
+ Addedbuffer-alloc-unsafe@1.1.0(transitive)
+ Addedbuffer-fill@1.0.0(transitive)
+ Addedisbinaryfile@3.0.3(transitive)