gulp-scan

0.1.4 • Public • Published

gulp-scan Build Status

A plugin to scan a file for a string or expression

Install

$ npm install --save-dev gulp-scan

Usage

var gulp = require('gulp');
var scan = require('gulp-scan');
 
gulp.task('default', function () {
    return gulp.src('src/file.ext')
        .pipe(scan({ term: '@import', fn: function (match, file) {
            // do something with {String} `match`
            // `file` is a clone of the vinyl file.
        }}));
});

API

scan(options)

options

term

Type: string or RegExp

A term to scan the file for. Can be either a string or regular expression.

fn

Type: Function

A function that will receive the individual matches found in a file.

License

MIT © Gilt Groupe

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.4
    1,849
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.4
    1,849
  • 0.1.3
    0
  • 0.1.2
    0
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i gulp-scan

Weekly Downloads

1,849

Version

0.1.4

License

MIT

Last publish

Collaborators

  • shellscape