-
-
Save dieffrei/ef00627930ffc633854a48aa4c5f9a0f to your computer and use it in GitHub Desktop.
grunt: an example of building task targets dynamically
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
/*global module:false*/ | |
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
min: { | |
ariaAccessibility: { | |
src: ['src/javascripts/jquery.selectBoxIt.ariaAccessibility.js'], | |
dest: 'src/javascripts/jquery.selectBoxIt.ariaAccessibility.min.js' | |
}, | |
disable: { | |
src: ['src/javascripts/jquery.selectBoxIt.disable.js'], | |
dest: 'src/javascripts/jquery.selectBoxIt.disable.min.js' | |
}, | |
enable: { | |
src: ['src/javascripts/jquery.selectBoxIt.enable.js'], | |
dest: 'src/javascripts/jquery.selectBoxIt.enable.min.js' | |
}, | |
destroy: { | |
src: ['src/javascripts/jquery.selectBoxIt.destroy.js'], | |
dest: 'src/javascripts/jquery.selectBoxIt.destroy.min.js' | |
}, | |
setOption: { | |
src: ['src/javascripts/jquery.selectBoxIt.setOption.js'], | |
dest: 'src/javascripts/jquery.selectBoxIt.setOption.min.js' | |
}, | |
setOptions: { | |
src: ['src/javascripts/jquery.selectBoxIt.setOptions.js'], | |
dest: 'src/javascripts/jquery.selectBoxIt.setOptions.min.js' | |
}, | |
wait: { | |
src: ['src/javascripts/jquery.selectBoxIt.wait.js'], | |
dest: 'src/javascripts/jquery.selectBoxIt.wait.min.js' | |
} | |
} | |
}); | |
// etc. | |
}; |
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
/*global module:false*/ | |
module.exports = function(grunt) { | |
var min = {}; | |
[ | |
'ariaAccessibility', | |
'disable', | |
'enable', | |
'destroy', | |
'setOption', | |
'setOptions', | |
'wait' | |
].forEach(function(name) { | |
min[name] = { | |
src: 'src/javascripts/jquery.selectBoxIt.' + name + '.js', | |
dest: 'src/javascripts/jquery.selectBoxIt.' + name + '.min.js' | |
}; | |
}); | |
// Project configuration. | |
grunt.initConfig({ | |
min: min | |
}); | |
// etc. | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment