Skip to content

Commit

Permalink
Merge pull request #558 from RnbWd/master
Browse files Browse the repository at this point in the history
Updated Async Callback Support Readme
  • Loading branch information
yocontra committed Jun 30, 2014
2 parents 37143f3 + c4e4055 commit bb59b9b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docs/API.md
Expand Up @@ -95,9 +95,14 @@ Tasks can be made asynchronous if its `fn` does one of the following:
##### Accept a callback

```javascript
gulp.task('somename', function(cb) {
// Do stuff
cb(err);
// Run a command in a shell
var exec = require('child_process').exec;
gulp.task('jekyll', function(cb) {
// Build Jekyl
exec('jekyll build', function(err) {
if (err) return cb(err); //return error
cb(); // finished task
});
});
```

Expand Down

0 comments on commit bb59b9b

Please sign in to comment.