Skip to content

Instantly share code, notes, and snippets.

@syahrasi
Created December 2, 2012 07:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syahrasi/4187622 to your computer and use it in GitHub Desktop.
Save syahrasi/4187622 to your computer and use it in GitHub Desktop.
Guardfile for shopify theme development
# ignore temporary file
ignore /.*~/
notification :tmux,
:display_message => true,
:default_message_format => '%s >> %s',
# the first %s will show the title, the second the message
# Alternately you can also configure *success_message_format*,
# *pending_message_format*, *failed_message_format*
:line_separator => ' > ', # since we are single line we need a separator
:color_location => 'status-left-bg' # to customize which tmux element will change color
guard 'compass' do
watch(%r{(.*)\.s[ac]ss$})
end
# Using guard-shell and shopify_theme gem
guard :shell do
watch /(assets|config|layout|snippets|templates).*/ do |m|
# n m[0], 'File Changed'
m[0] + ' File Changed'
`theme upload #{m[0]}`
# n m[0], 'Uploaded'
m[0] + ' Uploaded'
end
end
guard 'livereload' do
watch /(assets|config|layout|snippets|templates).*/
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment