2.0.0 • Published 6 years ago

gulp-tap v2.0.0

Weekly downloads
60,147
License
MIT
Repository
github
Last release
6 years ago

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)

lpbteditorconfig-lint-jsadgile-dev@somoscuatro/gulp-wordpress-themejoyerfomantic-ui-semeia@infinitebrahmanuniverse/nolb-gulp-t@everything-registry/sub-chunk-1812plus.webclient.buildtarot-slimwix-lucy-clixiaomin001testthinkdown@cobalt-engine/dev-build-strategy@cremadesign/captcha@cwi/shp-cijenniferjugsjugs-vuejb-gulp-lesshint-stylishkit-build-assetsfrontkitstofstik-coffee-projecttwriterui5-lib-util@ampatspell/wireframe@alicd/sugar@battr/battr-build@14four/falcon1000-packages@colinrotherham/coreyummy-flowyanatrawebpack-frontlinevirteom.public.common-gulp-tasks@fasttime/gulp-lint@fasttime/lint@hungryinc/dustjs-express-engine@flua/gulp-init@ekolabs/project-kit@gilt-tech/swig-install@gilt-tech/swig-minify@gilt-tech/swig-spec@gilt-tech/swig-transpile-scripts@gentsagency/gulp-registry@infoprojects/decaf@literacyplanet/lambda_gulp_deploy@mantle/wp-theme-gulp@mrhenry/gulp-registry@node-sitecore/cli@node-sitecore/cli-plugin-fractal@node-sitecore/cli-plugin-vue@erchaves/sugarcone@justeat/gulp-build-fozzie@jaybirdgroup/jb-gulp-lesshint-stylish@ima/gulp-tasks@salespreso/deck-gulp-tasks@rm-frontend/build-tools@polkas/my-component@pitcher/fomantic-ui@panacea/holon-cli@ssovit/devthingmod-buildminecraft-addon-toolchainminecraft-addon-toolchain-browserifyminecraft-addon-toolchain-webpackminified-angularmongo-sites-apiminify-imagemystikomi-mp-webnz-animatenz-gridserval-backbonere-svgifypuzle-shapeshifterproactive-gulp-packsenogulpnorma-sassnorma-javascriptnode-sitecore-cliplantingjspostcss-middlewarepremailquick-sipquick-sip-vecnaroboticssfdx-watchsimple-meshsetrobot-gulpslush-springrollsmashing-dev-toolreact-native-twilio-video-webrtc-withandroidgoldfish-compilerimago.angularigem-wikibrickid-projectima-gulp-tasksgulp-lesshint-stylishgulp-jscs-stylish
2.0.0

6 years ago

1.0.1

8 years ago

0.4.2

8 years ago

0.4.1

8 years ago

0.4.0

8 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago