1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

[Sass] [sass-convert] Add a --no-cache option.

This commit is contained in:
Nathan Weizenbaum 2010-02-21 17:14:29 -08:00
parent 9a94cfb357
commit 3013d1df65

View file

@ -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