
Security News
Socket Security Analysis Is Now One Click Away on npm
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.
gulp-watch-sequence
Advanced tools
Merge the actions of multiple watch triggers into a single common sequence.
Merge the actions of multiple watch triggers into a single common sequence.
Install with npm.
npm install --save-dev gulp-watch-sequence
The the following example we are watching both javascript and css.
It is possible (using save-all in our IDE) that both will trigger in close succession. However we wish the 'html' and 'reload' tasks to be performed only once.
Both will fire the different handlers that we have obtained for them and be merged on the queue. The queue is flushed 300 milliseconds following.
var gulp = require('gulp');
var watch = require('gulp-watch');
var sequence = require('gulp-watch-sequence');
gulp.task('watch', function () {
var queue = sequence(300);
watch({
name: 'JS',
emitOnGlob: false,
glob: 'src/**/*.js'
}, queue.getHandler('js', 'html', 'reload'));
watch({
name: 'CSS',
emitOnGlob: false,
glob: 'scss/**/*.scss'
}, queue.getHandler('css', 'html', 'reload'));
});
Get an instance for the given timeout value.
Sequences triggered within the timeout will share the same sequence run, delayed by at most timeout milliseconds.
The before method may return void to execute the pending sequence, or may return a new sequence based upon the
arguments it was given.
@param {number?} timeout The period to aggregate triggers over in milliseconds.
@param {function?} filter A method to filter the aggregate sequence directly before it is run.
@returns {{get:function, trigger:function}}
Get a gulp-watch handler for the given sequence.
@param {...string} A sequence of gulp tasks to run.
@return {function} A gulp-watch handler method that will enqueue the given sequence.
Manually enqueue the given sequence of gulp tasks, possibly including done callback.
@param {...string|function} A sequence of gulp tasks to run, with optional trailing callback.
@returns {array.<string|function} The current value of the aggregate sequence.
Manually trigger the currently aggregated sequence of tasks.
FAQs
Merge the actions of multiple watch triggers into a single common sequence.
The npm package gulp-watch-sequence receives a total of 13 weekly downloads. As such, gulp-watch-sequence popularity was classified as not popular.
We found that gulp-watch-sequence demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.