mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Sass] [sass-convert] Properly set default formats.
This commit is contained in:
parent
731891b5c3
commit
b97bde7a62
1 changed files with 7 additions and 2 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Reference in a new issue