Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task dependency confusion #265

Closed
scriby opened this issue Feb 13, 2014 · 3 comments
Closed

Task dependency confusion #265

scriby opened this issue Feb 13, 2014 · 3 comments

Comments

@scriby
Copy link

scriby commented Feb 13, 2014

I know gulp just relies on orchestrator for this, but I found that the way it handles multiple serial dependencies is cumbersome. I'll explain -

gulp.task('clean', function(){ ... });

gulp.task('compile', function() { ... });

gulp.task('post', function(){ ... });

gulp.task('build', [ 'clean', 'compile', 'post' ], function(){});

I want to be able to define my "build" task like that, where it will run clean, compile, then post in order. The problem is that orchestrator will run the three dependencies at once.

I can make it work like this:

gulp.task('clean', function(){ ... });

gulp.task('compile', ['clean'], function() { ... });

gulp.task('post', ['compile'], function(){ ... });

gulp.task('build', [ 'clean', 'compile', 'post' ], function(){});

The problem with this approach is that I can't re-combine my build tasks in new ways. I can't just kick off my compile task - it has to run clean first. And I can't kick off my post task by itself - it has to run compile first.

Maybe there's a way to kick off the other tasks from the body of my build function in series? This seems like a common enough case that i'd expect gulp to handle it well out of the box (or am I missing something here?).

Thanks for taking a look,

Chris

@yocontra
Copy link
Member

cc @robrich

@sindresorhus
Copy link
Contributor

Duplicate of robrich/orchestrator#26

@robrich
Copy link
Contributor

robrich commented Feb 13, 2014

I agree. Note your thoughts in robrich/orchestrator#26 and let's find good
syntax for stringing tasks together when you call run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants