Skip to content

Instantly share code, notes, and snippets.

@jesseobrien
Last active December 23, 2015 20:19
Show Gist options
  • Select an option

  • Save jesseobrien/6688243 to your computer and use it in GitHub Desktop.

Select an option

Save jesseobrien/6688243 to your computer and use it in GitHub Desktop.
Guardfile
# Watch app/views, app/contrillers and public for any changes
guard 'livereload' do
watch(%r{app/views/.+\.(php)$})
watch(%r{app/controllers/.+\.(php)$})
watch(%r{public/.+\.(css|js|html)})
end
# Refresh database migrations and seed after changing any migration files
guard 'shell' do
watch(%r{app/database/migrations.*}) do |m|
n m[0], 'Migrations Changed'
`php artisan migrate:refresh --seed`
end
end
# Compile less assets and move them into /public/css
guard 'less', :all_on_start => true, :all_after_change => true, :output => 'public/css/' do
watch(%r{^app/assets/(.+\.less)$})
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment