-
-
Save ismarsantos/9d5ca3fdc3e6a0733a80b84896191818 to your computer and use it in GitHub Desktop.
Rails Livereload
This file contains hidden or 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
| Booth::Application.configure do | |
| # Add Rack::LiveReload to the bottom of the middleware stack with the default options. | |
| config.middleware.insert_after ActionDispatch::Static, Rack::LiveReload | |
| end |
This file contains hidden or 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
| source "https://rubygems.org" | |
| ruby "2.2.2" | |
| gem "rails", "4.2.0" | |
| group :development do | |
| gem "foreman" | |
| gem "guard-livereload", require: false | |
| gem "rack-livereload" | |
| end |
This file contains hidden or 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
| # More info at https://github.com/guard/guard#readme | |
| guard :livereload do | |
| watch(%r{app/views/.+\.(erb|haml|slim)$}) | |
| watch(%r{app/helpers/.+\.rb}) | |
| watch(%r{public/.+\.(css|js|html)}) | |
| watch(%r{config/locales/.+\.yml}) | |
| # Rails Assets Pipeline | |
| watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|html|jpg|js|png|scss))).*}) {|m| "/assets/#{m[3]}" } | |
| end |
This file contains hidden or 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
| livereload: bundle exec guard start -i -g livereload | |
| web: bundle exec rails s Puma --binding 0.0.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment