Last active
August 29, 2015 14:01
-
-
Save jussi-kalliokoski/608e890d0fb491edc78e to your computer and use it in GitHub Desktop.
wait for things to settle before running a task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"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