Last active
October 11, 2015 04:07
-
-
Save jpsirois/5f2038e66326ea73e4c1 to your computer and use it in GitHub Desktop.
Guardfile Exemple
This file contains hidden or 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
guard 'shell' do | |
watch(/(^src\/haml\/(.+)\.haml)/) do |match| | |
puts match[0] + " changed at " + Time.now.strftime("%H:%M:%S") +". Re-generating HTML from HAML" | |
`haml #{match[1]} #{match[2]}.html` | |
`terminal-notifier -group 'haml' -title 'Regenerating Coffeescript' -message '#{match[0]}'` | |
end | |
watch(/(^src\/sass\/.+)/) do |match| | |
puts match[0] + " changed at " + Time.now.strftime("%H:%M:%S") +". Re-generating CSS from SASS." | |
`Compass compile` | |
`terminal-notifier -group 'compass' -title 'Regenerating Compass' -message '#{match[0]}'` | |
end | |
watch(/(^src\/coffeescript\/.+)/) do |match| | |
puts match[0] + " changed at " + Time.now.strftime("%H:%M:%S") +". Re-generating JS from CoffeeScript" | |
`coffee -c -o assets/javascripts src/coffeescript` | |
`terminal-notifier -group 'coffeescript' -title 'Regenerating Coffeescript' -message '#{match[0]}'` | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment