Описание тега gulp-tap

NoneA gulp plugin that makes it easy to tap into a gulp stream.

gulp-tap is a gulp plugin that makes it easy to tap into a gulp stream.

For example, it's needed to update the contents of all Markdown files from the pipeline, but not the JavaScript files, and still output all of the files into target build folder. It can be done like that:

var gulp = require('gulp');
var tap = require('gulp-tap');

gulp.src('app/**/*.{js,md}')
  .pipe(tap(function(file) {
    if (path.extname(file.path) === '.md') {
      file.contents = new Buffer('The updated content of Markdown file!');   
    }
  }))
  .pipe(gulp.dest('./build'));