module Jekyll::Assets::Patches::ObsoleteFiles
– Patches
Jekyll's obsolete files so that we can remove assets that we have used through the manifest. We expect the user to keep that manifest available, regardless of what's going on in their stuff. –
Public Instance Methods
obsolete_files(*args)
click to toggle source
– @param [Object] args whatever Jekyll
takes. Gives a list of files that should be removed, unless used. @return [Array<String>] –
Calls superclass method
# File lib/jekyll/assets/patches/obsolete.rb, line 20 def obsolete_files(*args) extras = Utils.manifest_files(site.sprockets) extras.concat(site.sprockets.raw_precompiles .map { |v| v.values_at(:dst, :full_dst) } .flatten.uniq) super(*args).reject do |v| v == site.sprockets.in_dest_dir || \ v == site.sprockets.manifest.filename || \ extras.include?(v) end end