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

Add docs on tasks depending on other async tasks #36

Merged
merged 1 commit into from Dec 4, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 11 additions & 8 deletions README.md
Expand Up @@ -145,14 +145,6 @@ gulp.task('default', function(){
});
```

##### Task dependencies

```javascript
gulp.task('somename', ['array','of','task','names'], function(){
// do stuff
});
```

##### Async tasks

With callbacks:
Expand Down Expand Up @@ -192,6 +184,17 @@ gulp.task('somename', function(){
});
```

##### Task dependencies

```javascript
gulp.task('somename', ['array','of','task','names'], function(){
// do stuff
});
```

If the dependencies are asynchronous, it is not guaranteed that they will finish before `'somename'` is executed. To ensure they are completely finished, you need to make sure the dependency tasks have asynchronous support through one of the methods outlined above. The most simple method is to return the stream. By returning the stream, Orchestrator is able to listen for the end event and only run `'somename'` once each dependencies' stream end event has been emitted.


### gulp.run(tasks...[, cb])

Triggers tasks to be executed. *Does not run in order*.
Expand Down