Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shellscape/gulp-scan
A Gulp plugin to scan a file for a particular string or expression
https://github.com/shellscape/gulp-scan
find gulp gulp-plugin gulp-tasks gulpjs nodejs npm scanner search
Last synced: 6 days ago
JSON representation
A Gulp plugin to scan a file for a particular string or expression
- Host: GitHub
- URL: https://github.com/shellscape/gulp-scan
- Owner: shellscape
- License: mit
- Archived: true
- Created: 2016-01-24T03:03:04.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-18T08:47:14.000Z (about 7 years ago)
- Last Synced: 2024-04-30T02:40:42.969Z (9 months ago)
- Topics: find, gulp, gulp-plugin, gulp-tasks, gulpjs, nodejs, npm, scanner, search
- Language: JavaScript
- Size: 13.7 KB
- Stars: 5
- Watchers: 10
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-scan [![Build Status](https://travis-ci.org/shellscape/gulp-scan.svg?branch=master)](https://travis-ci.org/shellscape/gulp-scan)
A plugin to scan a file for a string or expression
##
:rocket: Are you ready to tackle ES6 and hone your JavaScript Skills? :rocket:
Check out these outstanding ES6 courses by @wesbos
---## Install
```
$ npm install --save-dev gulp-scan
```## Usage
```js
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](https://github.com/gilt)