wishthis/node_modules/gulp-tap
2022-02-23 17:41:13 +01:00
..
lib Add production dependencies 2022-01-21 09:28:41 +01:00
node_modules/through2 Update dependencies 2022-02-23 17:41:13 +01:00
src Add production dependencies 2022-01-21 09:28:41 +01:00
tests Add production dependencies 2022-01-21 09:28:41 +01:00
.npmignore Add production dependencies 2022-01-21 09:28:41 +01:00
.travis.yml Add production dependencies 2022-01-21 09:28:41 +01:00
index.js Add production dependencies 2022-01-21 09:28:41 +01:00
LICENSE Add production dependencies 2022-01-21 09:28:41 +01:00
Makefile Add production dependencies 2022-01-21 09:28:41 +01:00
package.json Update dependencies 2022-02-23 17:41:13 +01:00
README.md Add production dependencies 2022-01-21 09:28:41 +01:00

gulp-tap Build Status Coverage Status Dependencies Status

Easily tap into a pipeline.

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)