e534a911f3
Prettier v2 has the following breaking changes: * enforces spaces between `function` and params * enforces trailing commas by default
14 lines
333 B
JavaScript
14 lines
333 B
JavaScript
module.exports = { createRegisterAsyncTaskFn };
|
|
|
|
function createRegisterAsyncTaskFn(grunt) {
|
|
return function registerAsyncTask(name, asyncFunction) {
|
|
grunt.registerTask(name, function () {
|
|
asyncFunction()
|
|
.catch((error) => {
|
|
grunt.fatal(error);
|
|
})
|
|
.finally(this.async());
|
|
});
|
|
};
|
|
}
|