datalad-course/node_modules/gulp-tap
2025-03-21 15:28:44 +01:00
..
lib A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
node_modules/through2 A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
src A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
tests A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
.travis.yml A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
index.js A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
LICENSE A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
Makefile A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
package.json A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00
README.md A new start for all of Adina's DataLad Course talks - properly annexed 2025-03-21 15:28:44 +01:00

gulp-tap Build Status Coverage Status Dependencies Status

Easily tap into a pipeline.

Install

npm install gulp-tap --save-dev

Uses

Some filters like gulp-coffee process all files. What if you want to process all JS and Coffee files in a single pipeline. Use tap to filter out .coffee files and process them through the coffee filter and let JavaScript files pass through.

gulp.src("src/**/*.{coffee,js}")
    .pipe(tap(function(file, t) {
        if (path.extname(file.path) === '.coffee') {
            return t.through(coffee, []);
        }
    }))
    .pipe(gulp.dest('build'));

What if you want to change content like add a header? No need for a separate filter, just change the content.

tap(function(file) {
    file.contents = Buffer.concat([
        new Buffer('HEADER'),
        file.contents
    ]);
});

If you do not return a stream, tap forwards your changes.

Examples

See Wiki for more examples.

License

The MIT License (MIT)