/gulp-find

A string finder plugin for gulp

Primary LanguageJavaScriptMIT LicenseMIT

gulp-find

Codacy Badge bitHound Overall Score bitHound Code Code Climate Build Status npm version Dependency Status devDependency Status GitHub license

Overview

Simple text finder(files, streams) via gulp.

NPM

Install

npm install --save-dev gulp-find

Usage

Regex find
var find = require('gulp-find');

gulp.task('templates', function(){
  gulp.src(['file.txt'])
    .pipe(find(/foo(.{3})/g))
    .pipe(gulp.dest('build/file.txt'));
});
String find
var find = require('gulp-find');

gulp.task('templates', function(){
  gulp.src(['file.txt'])
    .pipe(find('bar'))
    .pipe(gulp.dest('build/file.txt'));
});
What if I need replace?

Use gulp-replace for string replace.

if you need first find, and replace after, you may combine gulp-find and gulp-replace via pipe