From f111bd73d506750b1e89c361b3285cbb3a031765 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sun, 28 Jun 2009 16:19:38 -0700 Subject: [PATCH] [Command Line] Fixed a bug in --watch mode that caused changes to partials to not be noticed. --- lib/compass/compiler.rb | 6 +++--- lib/compass/configuration.rb | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/compass/compiler.rb b/lib/compass/compiler.rb index 84fb3945..c48b2b63 100644 --- a/lib/compass/compiler.rb +++ b/lib/compass/compiler.rb @@ -34,15 +34,15 @@ module Compass end def out_of_date? + Compass.configure_sass_plugin! unless Compass.sass_plugin_configured? sass_files.zip(css_files).each do |sass_filename, css_filename| - return sass_filename unless File.exists?(css_filename) - return sass_filename if File.stat(sass_filename).mtime > File.stat(css_filename).mtime + return sass_filename if Sass::Plugin.exact_stylesheet_needs_update?(css_filename, sass_filename) end false end def run - Compass.configure_sass_plugin! + Compass.configure_sass_plugin! unless Compass.sass_plugin_configured? target_directories.each do |dir| directory dir end diff --git a/lib/compass/configuration.rb b/lib/compass/configuration.rb index dc00cd45..59da900a 100644 --- a/lib/compass/configuration.rb +++ b/lib/compass/configuration.rb @@ -273,9 +273,14 @@ module Compass end def configure_sass_plugin! + @sass_plugin_configured = true Sass::Plugin.options.merge!(sass_plugin_configuration) end + def sass_plugin_configured? + @sass_plugin_configured + end + def sass_engine_options configuration.to_sass_engine_options end