Persist the preview servers options (like port) when reloading

This commit is contained in:
Rico Sta. Cruz 2012-06-16 06:20:40 +08:00
parent f4feda8b93
commit 8a898f8239

View file

@ -41,6 +41,10 @@ module Middleman
start_file_watcher unless options[:"disable-watcher"]
# Save the last-used options so it may be re-used when
# reloading later on.
@last_options = options
@webrick.start
end
end
@ -56,7 +60,7 @@ module Middleman
# @return [void]
def reload
stop
start
start @last_options
end
# Stop the current instance, exit Webrick