Socket
Book a DemoInstallSign in
Socket

gulp-chokidar

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-chokidar

[DEPRECATED] Awesome Gulp Watcher

latest
Source
npmnpm
Version
0.0.5
Version published
Weekly downloads
19
-20.83%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-chokidar

Deprecated: use gulp-watch instead.

Awesome Gulp Watcher and glob wrapper for chokidar.

Install

npm i gulp-chokidar

Usage

For using gulp tasks you need to pass gulp instance

var gulp = require('gulp'),
    watch = require('gulp-chokidar')(gulp);

gulp.task('hello-css');

gulp.task('default', function () {
    watch('src/css/**/*.css', 'hello-css');
});

Or you may use watcher without gulp

var watch = require('gulp-chokidar');

watch('src/css/**/*.css', function () {
	console.log('update something);
});

API

watch(globs, [options, task])

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

task

This task is called, when some events is happens on file-system. If gulp instance passed with require task can be function, task string or task array.

options

options.ready

Type: Boolean Default: false

Run task on start watching

Events

  • all — any event.
  • ready — emits on watcher ready.
  • add — when new file was created.
  • change — when file was changed.
  • delete — when file was deleted`.
  • error — when something happened inside callback, you will get notified.
require('gulp-chokidar')('src/css/**/*.css')
	.on('change', function () {
		console.log('update something);
	});

#License

The MIT License (MIT)

Copyright © 2014 Bogdan Chadkin

Keywords

gulp

FAQs

Package last updated on 26 Jun 2015

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