Last active
August 29, 2015 14:15
-
-
Save NickHeiner/08ba1ad5c958896a9429 to your computer and use it in GitHub Desktop.
grunt async
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How it is | |
grunt.registerTask('my-async-task', function() { | |
var done = this.async(); | |
doAsyncWork().then(done).fail(done); | |
}); | |
// How it should be | |
grunt.registerTask('my-async-task', function() { | |
return doAsyncWork(); | |
}); | |
// How it should be - condensed | |
grunt.registerTask('my-async-task', doAsyncWork); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment