Created
July 28, 2014 14:37
-
-
Save hongkheng/98c3a0b8404f394c9b07 to your computer and use it in GitHub Desktop.
grunt dynamic task
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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