Files
handlebars.js/tasks/util/async-grunt-task.js
Jakob Linskeseder e534a911f3 Upgrade prettier to v2
Prettier v2 has the following breaking changes:
* enforces spaces between `function` and params
* enforces trailing commas by default
2022-10-29 21:49:15 +02:00

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());
});
};
}