gulp-frep

A find and replace utility, using Frep. Replace strings or arrays of strings with an array of replacement patterns.

gulp-frep (find and replace)

A find and replace utility, using Frep. Replace strings or arrays of strings with an array of replacement patterns.

Install the module with: npm install gulp-frep

var gulp = require('gulp');
var frep = require('gulp-frep');
 
gulp.task('frep', function() {
  gulp.src('./src/foo.html')
    .pipe(frep(patterns))
    .pipe(gulp.folder('./dist/foo.html'))
});
var patterns: [
  {
    // Strip tags from HTML 
    pattern: /(<([^>]+)>)/ig,
    replacement: ''
  },
  {
    // Normalize and condense newlines 
    pattern: /(\r\n|\n){2,}/g,
    replacement: '\n'
  }
];

See the frep docs for options.

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.

Copyright (c) 2014 Jon Schlinkert Licensed under the MIT license.