Skip to content

Commit

Permalink
changed how generate_sprites is hooked into sass compiling in rails
Browse files Browse the repository at this point in the history
  • Loading branch information
kraatob committed Jul 8, 2010
1 parent f973d16 commit f5c4b1d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions lib/lemonade.rb
Expand Up @@ -51,15 +51,16 @@ def compile(sass_filename, css_filename)
end
end


require 'sass'
require 'sass/plugin'

module Sass
class Engine
alias_method :render_without_lemonade, :render
def render
if result = render_without_lemonade
Lemonade::generate_sprites
result
end
module Plugin
alias update_stylesheets_without_lemonade update_stylesheets
def update_stylesheets(*args)
update_stylesheets_without_lemonade(*args)
Lemonade::generate_sprites
end
alias_method :to_css, :render
end
end

0 comments on commit f5c4b1d

Please sign in to comment.