Skip to content

Instantly share code, notes, and snippets.

@hongkheng
Created July 28, 2014 14:37
Show Gist options
  • Save hongkheng/98c3a0b8404f394c9b07 to your computer and use it in GitHub Desktop.
Save hongkheng/98c3a0b8404f394c9b07 to your computer and use it in GitHub Desktop.
grunt dynamic task
// Grunt dynamic tasks examples
// Example 1
https://oncletom.io/2013/dynamic-grunt-targets-using-templates/
// Example 2
// Call grunt release:target where target is the name of the subtask
grunt.registerTask('release', function(target) {
if (target === null) {
return grunt.warn("Build target must be specified, e.g. release:hover");
}
grunt.task.run('clean:'+target);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment