Created
January 16, 2012 08:23
-
-
Save bobspryn/1619728 to your computer and use it in GitHub Desktop.
filtering files in rake-pipeline
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
match "**/*.js" do | |
# block so uglify doesn't change name | |
uglify do |input| | |
input | |
end | |
# immediate has to come before modernizr | |
# block to filter if files even end up in a file at all | |
# need to decide between immediate and main (top of bottom of html file) | |
concat ['immediate.js', 'modernizr-2.0.min.js'], do |filename| | |
immedateGroup = ['immediate.js', 'modernizr-2.0.min.js'] | |
laterGroup = ['main.js', 'jquery.form.js', 'jquery.animate-enhanced.min.js'] | |
if immedateGroup.include?(filename.split('/').last) | |
"immediate.min." + VERS + ".js" | |
elsif laterGroup.include?(filename.split('/').last) | |
"main.min." + VERS + ".js" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment