Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
grunt multi tasks
// Register multi-tasks
grunt.registerMultiTask( 'conditional', 'Conditional tasks', function() {
switch ( this.target ) {
case 'case1':
grunt.task.run( this.data.tasks );
break;
case 'case2':
grunt.task.run( this.data.tasks );
break;
case 'case3':
grunt.task.run( this.data.tasks );
break;
case 'case4':
grunt.task.run( this.data.tasks );
break;
}
});
grunt.registerMultiTask( 'develop', 'Development tasks', function() {
grunt.task.run( this.data.tasks );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.