Created
December 5, 2012 02:08
-
-
Save fujimogn/4211484 to your computer and use it in GitHub Desktop.
livereload for wordless gem
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
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
# wordless | |
guard :shell do | |
# sass & less | |
watch(%r{^wp-content/themes/(\w+)/theme/assets/(.+)\.(s[ac]ss|less|css)$}){|m| | |
`rm -rf wp-content/themes/#{m[1]}/tmp/* && wordless clean && wordless compile` | |
} | |
# coffeescript & javascript | |
watch(%r{^wp-content/themes/(\w+)/theme/assets/(.+)\.(coffee|js)$}){|m| | |
`rm -rf wp-content/themes/#{m[1]}/tmp/* && wordless clean && wordless compile` | |
} | |
end | |
# livereload | |
guard 'livereload' do | |
# view | |
watch(%r{^wp-content/themes/\w+/theme/views/(.+)\.haml$}) | |
# config | |
watch(%r{^wp-content/themes/\w+/config/(.+)\.(php|inc)$}) | |
# static assets | |
watch(%r{^wp-content/themes/\w+/assets/(.+)/}) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment