New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

gulp-grep-fail

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-grep-fail

Greps files for occurances of a string and fails the build if they exist

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-grep-fail

Greps through the data on the gulp stream and fails the build if any of the specified strings occur in the piped files, or optionally fails the build if any of the strings are not found.

Installation

Easy as cake.

npm install gulp-grep-fail

Usage

Grep through all mocha tests for any only tests.

    gulp.task('default', function () {
      return gulp.src('test/**/*.js')
        .pipe(grepFail([ 'it.only', 'describe.only' ]));
    });

Grep through a file where you expect a specific version number to appear.

Contents of foo.js

{
  "version": "123"
}
    gulp.task('default', function () {
      return gulp.src('foo.js')
        .pipe(grepFail('123', {inverse: true}));
    });

API

grepFail(predicates, [options])

  • predicates (string|array) string(s) to grep for and fail if they exist
  • options.inverse (boolean) - optional default behaviour is to throw an error if a match is found. Set options.inverse to true to throw an error if a match is not found

License

MIT

FAQs

Package last updated on 08 Mar 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc