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
|
||||
# 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!
|
||||
class << self
|
||||
|
|
|
@ -10,11 +10,16 @@ module Middleman::Features::LiveReload
|
|||
end
|
||||
|
||||
new_config = ::LiveReload::Config.new do |config|
|
||||
config.exts = ::Tilt.mappings.keys
|
||||
::Tilt.mappings.each do |key, v|
|
||||
config.exts << key
|
||||
end
|
||||
end
|
||||
|
||||
pid = fork {
|
||||
require 'livereload'
|
||||
::LiveReload.run [Middleman::Server.views], new_config
|
||||
}
|
||||
|
||||
# Middleman::Server.public
|
||||
::LiveReload.run [Middleman::Server.views], new_config
|
||||
end
|
||||
alias :included :registered
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue