Skip to content

Instantly share code, notes, and snippets.

@jakebellacera
Created May 1, 2015 02:25
Show Gist options
  • Save jakebellacera/01f03d0cb583e6a66bc1 to your computer and use it in GitHub Desktop.
Save jakebellacera/01f03d0cb583e6a66bc1 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