-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
Currently, forward references to tasks do not work in gulp 4 (and gulp 3, but I don't care about that):
gulp.task('default', gulp.series('clean', 'build', 'watch', 'server'));
gulp.task('clean', function () {
// do something
});
...
This results in AssertionError: Task never defined: clean
.
From a stylistic standpoint, many people prefer to place the broadest tasks first and then define component tasks later, since this is how most people think and design code. Also the current 'bottom up', Forth-like restriction is no longer necessary considering how gulp 4 works.
From a design standpoint, since tasks are interchangeable with functions now, and since functions (like most stuff in Javascript) can be referenced from anywhere within the current scope regardless of where it was declared, to be consistent tasks should work the same way.
DullReferenceException, stuffnting and bre1470
Metadata
Metadata
Assignees
Labels
No labels