Created
April 30, 2013 16:53
-
-
Save bitpshr/5490064 to your computer and use it in GitHub Desktop.
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
// register someTask, which is either an array of | |
// tasks or an empty array based on someCondition | |
grunt.registerTask('someTask', (function () { | |
return someCondition ? [ 'submodules' ] : []; | |
})()); | |
// someTask is then used multiple times throughout | |
// the rest of the Gruntfile. | |
grunt.registerTask('default', [ 'someTask', 'watch:stylus' ]); | |
grunt.registerTask('test', [ 'someTask', 'intern-init', 'intern' ]); | |
grunt.registerTask('build', [ 'someTask', 'stylus:compile', 'clean', 'copy:dist' ]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment