Module: Laze::Plugins::CssImports

Defined in:
lib/laze/plugins/css_imports.rb

Overview

This plugin will replace any import statements in your stylesheets with the actual contents of the referenced files. This reduces the number of HTTP requests and speeds up your website loading time.

This plugin is a decorator for Target and fires before Target#save.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.applies_to?(kind) ⇒ Boolean

:nodoc:

Returns:

  • (Boolean)


9
10
11
# File 'lib/laze/plugins/css_imports.rb', line 9

def self.applies_to?(kind) #:nodoc:
  kind == :target
end

Instance Method Details

#saveObject



13
14
15
16
# File 'lib/laze/plugins/css_imports.rb', line 13

def save
  expand_css_imports
  super
end