manually handle recursion in mm-build, support symlinks. closes #20
This commit is contained in:
parent
350d36b018
commit
74266e7440
|
@ -78,13 +78,15 @@ module Middleman
|
|||
end
|
||||
|
||||
protected
|
||||
|
||||
def execute!
|
||||
lookup = config[:recursive] ? File.join(source, '**') : source
|
||||
def handle_directory(lookup)
|
||||
lookup = File.join(lookup, '{*,.[a-z]*}')
|
||||
|
||||
Dir[lookup].sort.each do |file_source|
|
||||
next if File.directory?(file_source)
|
||||
if File.directory?(file_source)
|
||||
handle_directory(file_source)
|
||||
next
|
||||
end
|
||||
|
||||
next if file_source.include?('layout')
|
||||
next unless file_source.split('/').select { |p| p[0,1] == '_' }.empty?
|
||||
|
||||
|
@ -104,5 +106,9 @@ module Middleman
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
def execute!
|
||||
handle_directory(source)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue