parent
428912850f
commit
1b1a5c086e
3 changed files with 11 additions and 5 deletions
|
@ -81,14 +81,14 @@ module Middleman
|
|||
end
|
||||
|
||||
def start_file_watcher
|
||||
return if @options[:"disable-watcher"]
|
||||
return if @options[:disable_watcher]
|
||||
|
||||
first_run = !@listener
|
||||
|
||||
if first_run
|
||||
# Watcher Library
|
||||
require "listen"
|
||||
@listener = Listen.to(Dir.pwd, :relative_paths => true)
|
||||
@listener = Listen.to(Dir.pwd, :relative_paths => true, :force_polling => @options[:force_polling])
|
||||
end
|
||||
|
||||
@listener.change do |modified, added, removed|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue