class Sass::Exec::SassConvert
def common_options(opts)
def common_options(opts) opts.separator '' opts.separator 'Common Options:' opts.on('-F', '--from FORMAT', 'The format to convert from. Can be css, scss, sass.', 'By default, this is inferred from the input filename.', 'If there is none, defaults to css.') do |name| @options[:from] = name.downcase.to_sym raise "sass-convert no longer supports LessCSS." if @options[:from] == :less unless [:css, :scss, :sass].include?(@options[:from]) raise "Unknown format for sass-convert --from: #{name}" end 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.', 'If there is none, defaults to sass.') do |name| @options[:to] = name.downcase.to_sym unless [:scss, :sass].include?(@options[:to]) raise "Unknown format for sass-convert --to: #{name}" end end opts.on('-i', '--in-place', 'Convert a file to its own syntax.', 'This can be used to update some deprecated syntax.') do @options[:in_place] = true end opts.on('-R', '--recursive', 'Convert all the files in a directory. Requires --from and --to.') do @options[:recursive] = true end opts.on("-?", "-h", "--help", "Show this help message.") do puts opts exit end opts.on("-v", "--version", "Print the Sass version.") do puts("Sass #{Sass.version[:string]}") exit end end