Socket
Book a DemoInstallSign in
Socket

gulp-frep

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-frep

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

latest
Source
npmnpm
Version
0.1.3
Version published
Weekly downloads
175
-46.97%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-frep (find and replace) NPM version

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

Getting Started

Install the module with: npm install gulp-frep

Usage

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'))
});

Example replacement patterns

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.

Contributing

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

Author

License

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

Keywords

beautify

FAQs

Package last updated on 13 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts