Really fix #1864
This commit is contained in:
parent
058a63a0de
commit
16c82fe57a
|
@ -1,6 +1,10 @@
|
||||||
master
|
master
|
||||||
===
|
===
|
||||||
|
|
||||||
|
# 4.1.5-4.1.6
|
||||||
|
|
||||||
|
* Fix file recursion when looking for possible asset dependencies. Major preview server performance improvement.
|
||||||
|
|
||||||
# 4.1.4
|
# 4.1.4
|
||||||
|
|
||||||
* Unify default extensions for all URL processing extensions. #1855
|
* Unify default extensions for all URL processing extensions. #1855
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
require 'listen'
|
require 'listen'
|
||||||
require 'middleman-core/contracts'
|
require 'middleman-core/contracts'
|
||||||
require 'digest'
|
require 'digest'
|
||||||
|
require 'set'
|
||||||
|
|
||||||
# Monkey patch Listen silencer so `only` works on directories too
|
# Monkey patch Listen silencer so `only` works on directories too
|
||||||
module Listen
|
module Listen
|
||||||
|
@ -49,7 +50,7 @@ module Middleman
|
||||||
# Reference to lower level listener
|
# Reference to lower level listener
|
||||||
attr_reader :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
|
# Construct a new SourceWatcher
|
||||||
#
|
#
|
||||||
|
@ -167,7 +168,8 @@ module Middleman
|
||||||
@listener = ::Listen.to(@directory.to_s, config, &method(:on_listener_change))
|
@listener = ::Listen.to(@directory.to_s, config, &method(:on_listener_change))
|
||||||
|
|
||||||
@listener.ignore(/^\.sass-cache/)
|
@listener.ignore(/^\.sass-cache/)
|
||||||
# @listener.only(@only) unless @only.empty?
|
@listener.ignore(/^node_modules/)
|
||||||
|
@listener.ignore(/^vendor\/bundle/)
|
||||||
|
|
||||||
@listener.start
|
@listener.start
|
||||||
end
|
end
|
||||||
|
@ -222,7 +224,8 @@ module Middleman
|
||||||
|
|
||||||
Contract Pathname => Bool
|
Contract Pathname => Bool
|
||||||
def should_not_recurse?(p)
|
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
|
end
|
||||||
|
|
||||||
# The `listen` gem callback.
|
# The `listen` gem callback.
|
||||||
|
@ -255,7 +258,8 @@ module Middleman
|
||||||
logger.debug "== Change (#{f[:types].inspect}): #{f[:relative_path]}"
|
logger.debug "== Change (#{f[:types].inspect}): #{f[:relative_path]}"
|
||||||
end
|
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|
|
related_updates.each do |f|
|
||||||
logger.debug "== Possible Change (#{f[:types].inspect}): #{f[:relative_path]}"
|
logger.debug "== Possible Change (#{f[:types].inspect}): #{f[:relative_path]}"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Middleman
|
module Middleman
|
||||||
# Current Version
|
# Current Version
|
||||||
# @return [String]
|
# @return [String]
|
||||||
VERSION = '4.1.5'.freeze unless const_defined?(:VERSION)
|
VERSION = '4.1.6'.freeze unless const_defined?(:VERSION)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue