Fix source watcher configuration
This commit is contained in:
parent
7c968b9572
commit
8b4e2d043c
4 changed files with 44 additions and 21 deletions
|
@ -28,10 +28,7 @@ module Middleman
|
|||
super
|
||||
|
||||
# Setup source collection.
|
||||
@sources = ::Middleman::Sources.new(app,
|
||||
disable_watcher: app.config[:watcher_disable],
|
||||
force_polling: app.config[:watcher_force_polling],
|
||||
latency: app.config[:watcher_latency])
|
||||
@sources = ::Middleman::Sources.new(app)
|
||||
|
||||
# Add default ignores.
|
||||
IGNORES.each do |key, value|
|
||||
|
@ -55,6 +52,13 @@ module Middleman
|
|||
# @return [void]
|
||||
Contract Any
|
||||
def after_configuration
|
||||
@watcher.update_config(
|
||||
disable_watcher: app.config[:watcher_disable],
|
||||
force_polling: app.config[:watcher_force_polling],
|
||||
latency: app.config[:watcher_latency],
|
||||
wait_for_delay: app.config[:watcher_wait_for_delay]
|
||||
)
|
||||
|
||||
if @original_source_dir != app.config[:source]
|
||||
@watcher.update_path(app.config[:source])
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue