Skip to content

Instantly share code, notes, and snippets.

@thisiskylierose
Created May 7, 2014 05:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thisiskylierose/5f2d4a3184d002626c8d to your computer and use it in GitHub Desktop.
Save thisiskylierose/5f2d4a3184d002626c8d to your computer and use it in GitHub Desktop.
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