From 3013d1df6512ad359ec7e1818765aba01790b97f Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Sun, 21 Feb 2010 17:14:29 -0800 Subject: [PATCH] [Sass] [sass-convert] Add a --no-cache option. --- lib/haml/exec.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/haml/exec.rb b/lib/haml/exec.rb index 796ee7d5..71118c1d 100644 --- a/lib/haml/exec.rb +++ b/lib/haml/exec.rb @@ -566,6 +566,7 @@ END 'The format to convert to. Can be scss or sass.', 'By default, this is inferred from the output filename.') do |name| @options[:to] = name.downcase.to_sym + @options[:for_engine][:syntax] = @options[:to] end opts.on('--old', 'Output the old-style ":prop val" property syntax.', @@ -573,6 +574,10 @@ END @options[:for_tree][:old] = true end + opts.on('-C', '--no-cache', "Don't cache to sassc files.") do + @options[:for_engine][:cache] = false + end + super end @@ -608,9 +613,9 @@ END else require 'sass' if input.is_a?(File) - ::Sass::Files.tree_for(input.path, :syntax => @options[:from]) + ::Sass::Files.tree_for(input.path, @options[:for_engine]) else - ::Sass::Engine.new(input.read, :syntax => @options[:from]).to_tree + ::Sass::Engine.new(input.read, @options[:for_engine]).to_tree end.send("to_#{@options[:to]}", @options[:for_tree]) end