This commit is contained in:
Thomas Reynolds 2016-01-13 17:16:36 -08:00
parent c213bd19df
commit 5f8beba4b3
24 changed files with 361 additions and 281 deletions

View file

@ -213,12 +213,12 @@ module Middleman
# Manually poll all watchers for new content.
#
# @return [void]
Contract Any
Contract ArrayOf[Pathname]
def find_new_files!
return unless @update_count != @last_update_count
return [] unless @update_count != @last_update_count
@last_update_count = @update_count
watchers.each(&:poll_once!)
watchers.reduce([]) { |sum, w| sum + w.poll_once! }
end
# Start up all listeners.