play with fixing live reload
This commit is contained in:
parent
f3bd7bd3d1
commit
3a7d30164d
2 changed files with 9 additions and 4 deletions
|
@ -79,7 +79,7 @@ module Middleman::Features
|
||||||
|
|
||||||
# LiveReload will auto-reload browsers with the live reload extension installed after changes
|
# LiveReload will auto-reload browsers with the live reload extension installed after changes
|
||||||
# Currently disabled and untested.
|
# Currently disabled and untested.
|
||||||
#autoload :LiveReload, "middleman/features/live_reload"
|
# autoload :LiveReload, "middleman/features/live_reload"
|
||||||
|
|
||||||
# The Feature API is itself a Feature. Mind blowing!
|
# The Feature API is itself a Feature. Mind blowing!
|
||||||
class << self
|
class << self
|
||||||
|
|
|
@ -10,11 +10,16 @@ module Middleman::Features::LiveReload
|
||||||
end
|
end
|
||||||
|
|
||||||
new_config = ::LiveReload::Config.new do |config|
|
new_config = ::LiveReload::Config.new do |config|
|
||||||
config.exts = ::Tilt.mappings.keys
|
::Tilt.mappings.each do |key, v|
|
||||||
|
config.exts << key
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Middleman::Server.public
|
pid = fork {
|
||||||
::LiveReload.run [Middleman::Server.views], new_config
|
require 'livereload'
|
||||||
|
::LiveReload.run [Middleman::Server.views], new_config
|
||||||
|
}
|
||||||
|
|
||||||
end
|
end
|
||||||
alias :included :registered
|
alias :included :registered
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue