1.0.0 • Published 7 years ago

@cluejs/gulp-watch v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

gulp-watch

Wrapper watcher for gulp with debounce

Install:

npm i cluejs/gulp-watch --save-dev
yarn add cluejs/gulp-watch -D

API:

watch(glob, options, callback)

Options:

  • (Number) debounce: 100 default

Usage:

...
global.$$ = {};
$$.env = require('@cluejs/gulp-env');
$$.gulp_watch = require('@cluejs/gulp-watch');

gulp.task('watch', (callback) => {
    $$.env.setDevelopment();
    
    function bundle_css() {
        // ... some code ... //
    }
    
    $$.gulp_watch([
        '**/*.css'
        ], {
            cwd: './src/css/', 
            debounce: 200
        }, bundle_css);
})
...