Skip to content

Instantly share code, notes, and snippets.

@jussi-kalliokoski
Last active August 29, 2015 14:01
Show Gist options
  • Save jussi-kalliokoski/608e890d0fb491edc78e to your computer and use it in GitHub Desktop.
Save jussi-kalliokoski/608e890d0fb491edc78e to your computer and use it in GitHub Desktop.
wait for things to settle before running a task
"use strict";
var gulp = require("gulp");
var exec = require("gulp-exec");
var _ = require("lodash");
// This task will do nothing until it hasn't been triggered within 1s.
gulp.task("exec", _.debounce(function () {
return gulp.src(["..."], { read: false })
.pipe(exec("ctags -R"));
}, 1000));
gulp.task("watch", function () {
gulp.watch("...", ["exec"]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment