Created
March 30, 2011 20:59
-
-
Save Kevnz/895290 to your computer and use it in GitHub Desktop.
Compass config
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
watch 'src/main/web/**/*' do | project_dir, relative_path | | |
dest_dir = File.join(project_dir, 'web') | |
src_path = File.join(project_dir, relative_path) | |
extn = File.extname(relative_path) | |
filename = File.basename(src_path, extn) | |
if extn == '.js' | |
parent_dir = File.join(dest_dir, parent_dir(src_path)) | |
dest_path = File.join(parent_dir, filename + extn) | |
Dir.mkdir(dest_dir) unless File.exists?(dest_dir) && File.directory?(dest_dir) | |
Dir.mkdir(parent_dir) unless File.exists?(parent_dir) && File.directory?(parent_dir) | |
File.copy(src_path, dest_path, true) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment