From fcdaf41dbc2b545ca88ca77942d0cf1edc6a4e7e Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 23 May 2009 09:45:16 -0700 Subject: [PATCH] [Command Line] Store sass cache files in the sass directory of the project. Closes GH-8. --- .gitignore | 2 ++ lib/compass/actions.rb | 3 ++- lib/compass/compiler.rb | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6af7b546..3b089a6b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,10 @@ tmp/* examples/*/stylesheets/* examples/*/*.html +examples/*/src/.sass-cache test/tmp test/fixtures/stylesheets/*/tmp test/fixtures/stylesheets/*/saved test/fixtures/stylesheets/empty +test/fixtures/stylesheets/*/sass/.sass-cache pkg/* diff --git a/lib/compass/actions.rb b/lib/compass/actions.rb index 16fca9b4..10fd7c5f 100644 --- a/lib/compass/actions.rb +++ b/lib/compass/actions.rb @@ -64,7 +64,8 @@ module Compass :line_comments => options[:line_comments], :style => options[:style], :css_filename => css_filename, - :load_paths => options[:load_paths]) + :load_paths => options[:load_paths], + :cache_location => options[:cache_location]) css_content = engine.render write_file(css_filename, css_content, options.merge(:force => true)) else diff --git a/lib/compass/compiler.rb b/lib/compass/compiler.rb index a1618c6e..5fa21ef9 100644 --- a/lib/compass/compiler.rb +++ b/lib/compass/compiler.rb @@ -10,6 +10,7 @@ module Compass self.from, self.to = from, to self.logger = options.delete(:logger) self.options = options + self.options[:cache_location] ||= File.join(from, ".sass-cache") end def sass_files