@yuheiy/gulp-debounce
v0.0.1
Published
Call a debounced function when stream flows.
Downloads
2
Readme
gulp-debounce
Call a debounced function when stream flows.
Install
npm i -D @yuheiy/gulp-debounce
Usage
const gulp = require('gulp')
const pug = require('gulp-pug')
const debounce = require('gulp-debounce')
const browserSync = require('browser-sync').create()
gulp.task('html', () =>
gulp.src('src/**/*.pug')
.pipe(pug())
.pipe(gulp.dest('dist'))
.pipe(debounce(browserSync.reload, 300))
)
API
debounce(func, [wait=0])
Creates and sets a debounced function.
License
MIT