Created
March 9, 2013 11:09
-
-
Save sylwit/5123856 to your computer and use it in GitHub Desktop.
Git hook for compiling Compass files
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
#!/usr/bin/env ruby | |
site_dir = `git rev-parse --show-toplevel`.strip! | |
themes_dir = site_dir + "/themes" | |
Dir[ themes_dir + "/*"].each do |theme| | |
if File.exist?("#{theme}/config.rb") | |
puts "Compiling Sass for production environment: #{theme}" | |
system "compass compile -e production --force #{theme}" | |
system "git add #{theme}/*" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment