lib/csscss/cli.rb in csscss-0.0.1 vs lib/csscss/cli.rb in csscss-0.1.0

- old
+ new

@@ -25,10 +25,19 @@ (v1 + v2).uniq end end end - puts Reporter.new(combined_redundancies).report(@verbose) + if @json + puts JSONReporter.new(combined_redundancies).report + else + puts Reporter.new(combined_redundancies).report(@verbose) + end + + rescue Parslet::ParseFailed => e + puts "Had a problem parsing the css" + puts e.cause.ascii_tree + exit 1 end def parse(argv) opts = OptionParser.new do |opts| opts.banner = "Usage: csscss [files..]"