This commit is contained in:
Thomas Reynolds 2016-03-27 14:12:32 -07:00
parent 058a63a0de
commit 16c82fe57a
3 changed files with 13 additions and 5 deletions

View file

@ -1,6 +1,10 @@
master
===
# 4.1.5-4.1.6
* Fix file recursion when looking for possible asset dependencies. Major preview server performance improvement.
# 4.1.4
* Unify default extensions for all URL processing extensions. #1855

View file

@ -2,6 +2,7 @@
require 'listen'
require 'middleman-core/contracts'
require 'digest'
require 'set'
# Monkey patch Listen silencer so `only` works on directories too
module Listen
@ -49,7 +50,7 @@ module Middleman
# Reference to lower level listener
attr_reader :listener
IGNORED_DIRECTORIES = %w(.git node_modules .sass-cache).freeze
IGNORED_DIRECTORIES = Set.new(%w(.git node_modules .sass-cache vendor/bundle .bundle))
# Construct a new SourceWatcher
#
@ -167,7 +168,8 @@ module Middleman
@listener = ::Listen.to(@directory.to_s, config, &method(:on_listener_change))
@listener.ignore(/^\.sass-cache/)
# @listener.only(@only) unless @only.empty?
@listener.ignore(/^node_modules/)
@listener.ignore(/^vendor\/bundle/)
@listener.start
end
@ -222,7 +224,8 @@ module Middleman
Contract Pathname => Bool
def should_not_recurse?(p)
IGNORED_DIRECTORIES.include?(p.basename.to_s)
relative_path = p.relative_path_from(@directory).to_s
IGNORED_DIRECTORIES.include?(relative_path)
end
# The `listen` gem callback.
@ -255,7 +258,8 @@ module Middleman
logger.debug "== Change (#{f[:types].inspect}): #{f[:relative_path]}"
end
related_updates = ::Middleman::Util.find_related_files(app, (updated_paths + removed_paths)).select(&method(:valid?))
related_sources = valid_updates.map { |u| u[:full_path] } + removed_paths
related_updates = ::Middleman::Util.find_related_files(app, related_sources).select(&method(:valid?))
related_updates.each do |f|
logger.debug "== Possible Change (#{f[:types].inspect}): #{f[:relative_path]}"

View file

@ -1,5 +1,5 @@
module Middleman
# Current Version
# @return [String]
VERSION = '4.1.5'.freeze unless const_defined?(:VERSION)
VERSION = '4.1.6'.freeze unless const_defined?(:VERSION)
end