Class: Sprockets::StaticCompiler

Inherits:
Object
  • Object
show all
Defined in:
lib/override.rb

Instance Method Summary collapse

Instance Method Details

#compile_specificObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/override.rb', line 7

def compile_specific
  if @manifest && File.exist?("#{@manifest_path}/manifest.yml")
    manifest = YAML.load(File.read("#{@manifest_path}/manifest.yml"))
  else
    manifest = {}
  end
  env.each_logical_path(paths) do |logical_path|
    if asset = env.find_asset(logical_path)
      digest_path = write_asset(asset)
      manifest[asset.logical_path] = digest_path
      manifest[aliased_path_for(asset.logical_path)] = digest_path
    end
  end
  write_manifest(manifest) if @manifest
end