Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lnked/57ab7cdbc64103d0deafebf4c00a59c1 to your computer and use it in GitHub Desktop.
Save lnked/57ab7cdbc64103d0deafebf4c00a59c1 to your computer and use it in GitHub Desktop.
How to run multiple streams in a single gulp task.
var es = require("event-stream");
var gulp = require("gulp");
// Important! If these tasks need to be ran sequentially, then specify the
// task(s) that need to be ran prior to these ones as a dependency.
gulp.task("move-files", function() {
return es.merge([
gulp.src("foo").pipe(gulp.dest("dist/")),
gulp.src("bar").pipe(gulp.dest("dist/")),
gulp.src("baz").pipe(gulp.dest("dist/")),
gulp.src("qux").pipe(gulp.dest("dist/"))
])
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment