Class: Sprockets::Manifest

Inherits:
Object
  • Object
show all
Defined in:
lib/spritely/sprockets/manifest.rb

Overview

In order to hook into Sprockets’ asset compilation appropriately, we must chain our own implementation of ‘compile`. Our extension calls up to the original, and then performs the same action on the generated sprite images, forcing the sprites to be part of the compiled asset manifest.

Instance Method Summary collapse

Instance Method Details

#compile_with_sprites(*args) ⇒ Object



10
11
12
13
# File 'lib/spritely/sprockets/manifest.rb', line 10

def compile_with_sprites(*args)
  compile_without_sprites(*args)
  compile_without_sprites(*Dir.glob(Spritely.directory.join('*.png')))
end