gulpjs / undertaker

Task registry that allows composition through series/parallel methods.
MIT License
200 stars 31 forks source link

Task definition order is important #62

Closed eddiemonge closed 8 years ago

eddiemonge commented 8 years ago

But why do they have to be?

gulp.task('first', gulp.series('one', 'two'));
gulp.task('one', function(done) {
  // do stuff
  done();
});

gulp.task('two', function(done) {
  // do stuff
  done();
});

throws:

assert.js:89
  throw new assert.AssertionError({
  ^
AssertionError: Task never defined: one
phated commented 8 years ago

The way you are using gulp 4 is an antipattern. This is by design but if you are unwilling to fix your code, we built https://github.com/gulpjs/undertaker-forward-reference for you to use.