Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Pass file information along to transform functions.

 - This is useful for times when you want dynamically transform files based on some logic.  For example, you're copying a file hierarchy, and want to instrument javascript files for code coverage, and compress images.
  • Loading branch information...
commit d227a8b95cdce7706897674a8681590e412fd1c3 1 parent 5f2cb1f
@justindujardin justindujardin authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/ncp.js
View
2  lib/ncp.js
@@ -90,7 +90,7 @@ function ncp (source, dest, options, callback) {
var readStream = fs.createReadStream(file.name),
writeStream = fs.createWriteStream(target, { mode: file.mode });
if(transform) {
- transform(readStream, writeStream);
+ transform(readStream, writeStream,file);
} else {
readStream.pipe(writeStream);
}
Please sign in to comment.
Something went wrong with that request. Please try again.