Skip to content

Instantly share code, notes, and snippets.

@NickHeiner
Last active August 29, 2015 14:15
Show Gist options
  • Save NickHeiner/08ba1ad5c958896a9429 to your computer and use it in GitHub Desktop.
Save NickHeiner/08ba1ad5c958896a9429 to your computer and use it in GitHub Desktop.
grunt async
// 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