Module: Sass::Plugin
- Defined in:
- lib/sass_extensions.rb
Overview
XXX: We can remove this check and monkeypatch once Sass 2.2 is released.
Instance Method Summary collapse
- #exact_stylesheet_needs_update?(css_file, template_file) ⇒ Boolean
- #stylesheet_needs_update?(name, template_path, css_path) ⇒ Boolean
Instance Method Details
#exact_stylesheet_needs_update?(css_file, template_file) ⇒ Boolean
56 57 58 59 60 61 62 63 64 |
# File 'lib/sass_extensions.rb', line 56 def exact_stylesheet_needs_update?(css_file, template_file) if !File.exists?(css_file) return true else css_mtime = File.mtime(css_file) File.mtime(template_file) > css_mtime || dependencies(template_file).any?(&dependency_updated?(css_mtime)) end end |
#stylesheet_needs_update?(name, template_path, css_path) ⇒ Boolean
51 52 53 54 55 |
# File 'lib/sass_extensions.rb', line 51 def stylesheet_needs_update?(name, template_path, css_path) css_file = css_filename(name, css_path) template_file = template_filename(name, template_path) exact_stylesheet_needs_update?(css_file, template_file) end |