move actual type detection to sprockets
This commit is contained in:
parent
6a3d2e7e4e
commit
c7922c4a35
1 changed files with 0 additions and 8 deletions
|
@ -28,9 +28,6 @@ module Middleman
|
|||
Contract None => Hash
|
||||
attr_reader :options
|
||||
|
||||
IMAGE_EXTENSIONS = %w(.png .jpg .jpeg .webp .svg .svgz .gif)
|
||||
FONT_EXTENSIONS = %w(.otf .woff .eot .ttf)
|
||||
|
||||
# Construct a new SourceWatcher
|
||||
#
|
||||
# @param [Middleman::Sources] parent The parent collection.
|
||||
|
@ -270,11 +267,6 @@ module Middleman
|
|||
def path_to_source_file(path)
|
||||
types = Set.new([@type])
|
||||
|
||||
if @type == :source
|
||||
types << :image if IMAGE_EXTENSIONS.include?(path.extname)
|
||||
types << :font if FONT_EXTENSIONS.include?(path.extname)
|
||||
end
|
||||
|
||||
::Middleman::SourceFile.new(
|
||||
path.relative_path_from(@directory), path, @directory, types)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue