From b97bde7a62809b37eb6c7410b06d4e0012389b30 Mon Sep 17 00:00:00 2001 From: Nathan Weizenbaum Date: Sun, 21 Feb 2010 18:21:38 -0800 Subject: [PATCH] [Sass] [sass-convert] Properly set default formats. --- 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 64676600..e2410719 100644 --- a/lib/haml/exec.rb +++ b/lib/haml/exec.rb @@ -559,13 +559,15 @@ END opts.on('-F', '--from FORMAT', 'The format to convert from. Can be css, scss, or sass.', - 'By default, this is inferred from the input filename.') do |name| + 'By default, this is inferred from the input filename.', + 'If there is none, defaults to css.') do |name| @options[:from] = name.downcase.to_sym end opts.on('-T', '--to FORMAT', 'The format to convert to. Can be scss or sass.', - 'By default, this is inferred from the output filename.') do |name| + 'By default, this is inferred from the output filename.', + 'If there is none, defaults to sass.') do |name| @options[:to] = name.downcase.to_sym @options[:for_engine][:syntax] = @options[:to] end @@ -607,6 +609,9 @@ END end end + @options[:from] ||= :css + @options[:to] ||= :sass + out = if @options[:from] == :css require 'sass/css'