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

gulp-sane-watch

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-sane-watch

Gulp watch with sane

  • 3.0.4
  • latest
  • Source
  • npm
  • Socket score

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

gulp-sane-watch NPM version Build Status Dependency Status

Version: 3.0.4

Installation

Run npm install gulp-sane-watch

Usage

const gulp = require('gulp');
const saneWatch = require('gulp-sane-watch');

gulp.task('watch', () => {
    saneWatch('css/**/*.css', () => {
        gulp.start('styles');
    });
});
const gulp = require('gulp');
const saneWatch = require('gulp-sane-watch');

gulp.task('watch', () => {
    saneWatch('css/**/*.css', { debounce: 300 }, () => {
        gulp.start('styles');
    });
});
const gulp = require('gulp');
const saneWatch = require('gulp-sane-watch');

gulp.task('watch', () => {
    saneWatch('css/**/*.css', {
        events: ['onChange', 'onAdd']
    }, () => {
        gulp.start('styles');
    });
});
const gulp = require('gulp');
const saneWatch = require('gulp-sane-watch');

gulp.task('watch', () => {
    saneWatch('css/**/*.css', {
        debounce: 300,
        onChange: () => {
            gulp.start('change');
        },
        onAdd: () => {
            gulp.start('add');
        },
        onDelete: () => {
            gulp.start('delete');
        }
    });
});
const gulp = require('gulp');
const saneWatch = require('gulp-sane-watch');

gulp.task('watch', () => {
    saneWatch('css/**/*.css', {
        saneOptions: {
            poll: true
        }
    }, () => {
        gulp.start('styles');
    });
});

API

saneWatch(glob, [options, callback])

glob
  • Type: String | Array

Creates watcher that will spy on files that were matched by glob which can be a node-glob string or array of strings.

options
saneOptions

This object is passed to sane options directly (refer to sane documentation).

debounce
  • Type: Integer
  • Unit: milliseconds
  • Default: 0
verbose
  • Type: Boolean
  • Default: true
onChange, onAdd, onDelete, onReady
  • Type: function(filename, path, stat)

This function is called, when some group of events is happens on file-system.

onDelete function parameter list does not include stat parameter.

onReady function parameter list does not include any parameter.

events
  • Type: Array
  • Default: ['onChange', 'onAdd', 'onDelete']

List of events, that should be watched by gulp-sane-watch. Contains event names from sane.

callback
  • Type: function(filename, path, stat)

This function is called, when some group of events is happens on file-system.

License

MIT © 2021 Gergely Kovács (gg.kovacs@gmail.com)

Keywords

FAQs

Package last updated on 02 Jan 2021

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