Class: Sprockets::StaticCompiler
- Inherits:
-
Object
- Object
- Sprockets::StaticCompiler
- Defined in:
- lib/specific_asset_compiler.rb
Instance Attribute Summary collapse
-
#env ⇒ Object
Returns the value of attribute env.
-
#paths ⇒ Object
Returns the value of attribute paths.
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
Instance Attribute Details
#env ⇒ Object
Returns the value of attribute env.
11 12 13 |
# File 'lib/specific_asset_compiler.rb', line 11 def env @env end |
#paths ⇒ Object
Returns the value of attribute paths.
11 12 13 |
# File 'lib/specific_asset_compiler.rb', line 11 def paths @paths end |
#target ⇒ Object
Returns the value of attribute target.
11 12 13 |
# File 'lib/specific_asset_compiler.rb', line 11 def target @target end |
Instance Method Details
#compile_specific ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/specific_asset_compiler.rb', line 13 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 |