Created
March 28, 2011 06:31
-
-
Save matthijsgroen/890078 to your computer and use it in GitHub Desktop.
Rake task to watch all scss 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
namespace :scss do | |
task :watch do | |
files = `find . -iname *.scss` | |
destination = "public/stylesheets/" | |
pairs = [] | |
files.each_line do |file| | |
file.strip! | |
pairs << "#{file}:#{destination}#{File.basename(file, ".scss")}.css" | |
end | |
command = "sass --watch #{pairs.join " "}" | |
`#{command}` | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment