Setting up livereload

This commit is contained in:
echarp 2018-09-15 23:50:13 +02:00
parent c65ca2579c
commit 8d3adf0308
2 changed files with 5 additions and 1 deletions

View File

@ -3,7 +3,7 @@
# rubocop:disable all
guard :livereload do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/views/.+\.(erb|haml|slim)})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})

View File

@ -57,4 +57,8 @@ Rails.application.configure do
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
# Add Rack::LiveReload to the bottom of the middleware stack with the default
# options:
config.middleware.insert_after ActionDispatch::Static, Rack::LiveReload
end