0.0.1 • Published 8 years ago

@yuheiy/gulp-debounce v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

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