Add --force-polling flag to server. Closes #730. Closes #644

This commit is contained in:
Thomas Reynolds 2013-01-13 11:56:53 -08:00
parent 428912850f
commit 1b1a5c086e
3 changed files with 11 additions and 5 deletions

View file

@ -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|