gruntfile-editor
gruntfile-editor copied to clipboard
#registerTask(): add function to array
registered task is array and task is function.
- Convert array to a function call
- Add
grunt.task.run(existingTasks)
to function call - Append function task to function call
See https://github.com/bezoerb/gruntfile-api/tree/master#register-task for reference
Before:
grunt.registerTask('build', [
'task1',
'task2',
'task3'
]);
After:
grunt.registerTask('build', function(target) {
grunt.task.run([
'task1',
'task2',
'task3'
]);
// new custom function task
});