Persist the preview servers options (like port) when reloading
This commit is contained in:
parent
f4feda8b93
commit
8a898f8239
1 changed files with 5 additions and 1 deletions
|
@ -40,6 +40,10 @@ module Middleman
|
|||
register_signal_handlers unless ::Middleman::WINDOWS
|
||||
|
||||
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
|
||||
|
@ -56,7 +60,7 @@ module Middleman
|
|||
# @return [void]
|
||||
def reload
|
||||
stop
|
||||
start
|
||||
start @last_options
|
||||
end
|
||||
|
||||
# Stop the current instance, exit Webrick
|
||||
|
|
Loading…
Reference in a new issue