play with fixing live reload

This commit is contained in:
Thomas Reynolds 2011-06-05 12:44:57 -07:00
parent f3bd7bd3d1
commit 3a7d30164d
2 changed files with 9 additions and 4 deletions

View file

@ -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

View file

@ -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