Persist the preview servers options (like port) when reloading
This commit is contained in:
parent
f4feda8b93
commit
8a898f8239
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue