Minor perf tweaks
This commit is contained in:
parent
a14934e08b
commit
0f2bc1e0ea
19 changed files with 130 additions and 68 deletions
|
@ -298,9 +298,15 @@ module Middleman
|
|||
relative_path = path.relative_path_from(directory)
|
||||
relative_path = File.join(destination_dir, relative_path) if destination_dir
|
||||
|
||||
types << :no_frontmatter if partial?(relative_path.to_s)
|
||||
|
||||
::Middleman::SourceFile.new(Pathname(relative_path), path, directory, types, 0)
|
||||
end
|
||||
|
||||
def partial?(relative_path)
|
||||
relative_path.split(::File::SEPARATOR).any? { |p| p.start_with?('_') }
|
||||
end
|
||||
|
||||
Contract IsA['Middleman::SourceFile'] => Any
|
||||
def record_file_change(f)
|
||||
if @files[f[:full_path]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue