All SCSS files are re-compiled
Opened this issue · 0 comments
bpiwowar commented
I don't know if this is due to guard-compass, but I don't have this problem when running bundle exec compass compile
: all the SCSS files are recompiled after the second time I update a SCSS file (it is not included by any other). Here is my Guardfile
group :development do
if File.exists?("./config.rb")
# https://github.com/guard/guard-compass
guard :compass, configuration_file: './config.rb', compile_on_start: true do
watch(%r{(.*)\.s[ac]ss$})
end
end
# Uncomment if running a Drupal theme. Clears .info caches. Requires Drush.
if Dir.glob("*.info").any?
guard :shell do
puts 'Monitoring theme info file.'
watch(%r{.*\.info$}) { |m|
puts 'Change detected: ' + m[0]
`drush php-eval "system_rebuild_theme_data();"`
puts 'Cleared info caches.'
}
end
end
## Look for specified files in the current and child directories.
## `find` requires Ruby 1.9 or greater.
require 'find'
if Find.find(Dir.pwd).detect{|dir|dir=~/.+\.(css|js|html?|php|inc|theme)$/}
guard :livereload do
watch(%r{.+\.(css|js|html?|php|inc|theme)$})
end
end
end