Skip to content

Instantly share code, notes, and snippets.

@adamyonk
Last active December 10, 2015 22:38
Show Gist options
  • Save adamyonk/4503714 to your computer and use it in GitHub Desktop.
Save adamyonk/4503714 to your computer and use it in GitHub Desktop.
Guard watcher to run images through ImageOptim.app
gem 'guard'
gem 'guard-shell'
guard 'shell' do
watch %r{^public/images/.} do |file|
n file[0], 'Image changed'
`open #{file[0]} -a ImageOptim`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment