1

I'm watching for changes on files like this:

gulp.watch(['./src/js/**/*', './src/templates/**/*', config.vendor.js], ['js']);

Part of my build process involves using the "angular-filesort" module (don't think this is important though). If I implement the task as follows and use plumber, when filesort fails gulp doesn't quit and "watch" will keep checking for updates which is what I want:

gulp.task('js', function() {
    gulp.src('./src/js/**/*.js').pipe(plumber()).pipe(angularFilesort());
});

However, if I wrap up this process in a streamqueue, gulp will exit when filesort fails which I don't want:

gulp.task('js', function() {
    streamqueue({
    objectMode: true
    },
    gulp.src('./src/js/**/*.js').pipe(plumber()).pipe(angularFilesort())
    )
});

How can I fix this?

Specifically, I'm doing something like this to process 3 different sets of JavaScript files then concating them:

streamqueue({
  objectMode: true
},
gulp.src(config.vendor.js),
gulp.src('./src/js/**/*.js').pipe(angularFilesort()),
gulp.src(['src/templates/**/*.html']).pipe(templateCache({
  module: mainAngularModuleName
})))
.pipe(sourcemaps.init())
.pipe(concat('app.js'))
etc.

Is there perhaps a way I can do the above without streamqueue to work around this issue?

2 Answers 2

1

I had a similar issue and switching from streamqueue to stream-series resolved it for me. It's also cleaner than streamqueue because you don't need to specify the object mode.

Sign up to request clarification or add additional context in comments.

Comments

0

I found reinstalling node and upgrading all my packages fixed this.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.