update livereload settings

This commit is contained in:
Felix Niklas 2015-09-29 13:50:28 +02:00
parent 9b8aa6c50d
commit 08a372cb75
4 changed files with 12 additions and 15 deletions

View file

@ -78,10 +78,10 @@ group :development, :test do
gem 'selenium-webdriver'
# livereload on template changes (html, js, css)
gem 'guard', '>= 2.2.2', require: false
gem 'guard-livereload', require: false
gem 'guard', '>= 2.2.2', :require => false
gem 'guard-livereload', :require => false
gem 'rack-livereload'
gem 'rb-fsevent', require: false
gem 'rb-fsevent', :require => false
# code QA
gem 'rubocop'

View file

@ -340,6 +340,3 @@ DEPENDENCIES
twitter (~> 5.13.0)
uglifier
writeexcel
BUNDLED WITH
1.10.5

View file

@ -1,11 +1,13 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard 'livereload', port: '35738' do
guard :livereload, :port => "35738" do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html|svg)})
watch(%r{public/.+\.(css|js|html)})
watch(%r{config/locales/.+\.yml})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html|png|jpg|svg))).*}) { |m| "/assets/#{m[3]}" }
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html|png|jpg))).*}) { |m| "/assets/#{m[3]}" }
watch(%r{(app|vendor)(/assets/\w+/(.+)\.(scss))}) { |m| "/assets/#{m[3]}.css" }
watch(%r{(app|vendor)(/assets/\w+/(.+)\.(svg))}) { |m| "/assets/#{m[3]}.svg" }
end

View file

@ -32,12 +32,10 @@ Rails.application.configure do
config.assets.debug = false
# Automatically inject JavaScript needed for LiveReload
config.middleware.use(
Rack::LiveReload,
min_delay: 500, # default 1000
max_delay: 10_000, # default 60_000
live_reload_port: 35_738,
source: :vendored
config.middleware.insert_after(ActionDispatch::Static, Rack::LiveReload,
:min_delay => 500, # default 1000
:max_delay => 10_000, # default 60_000
:live_reload_port => 35738
)
# Asset digests allow you to set far-future HTTP expiration dates on all assets,