diff --git a/bin/jasmine-headless-webkit b/bin/jasmine-headless-webkit index 65b5885..79590e3 100755 --- a/bin/jasmine-headless-webkit +++ b/bin/jasmine-headless-webkit @@ -9,11 +9,13 @@ require 'getoptlong' require 'rubygems' +gem 'rainbow' gem 'jasmine' gem 'coffee-script' require 'jasmine' require 'coffee-script' +require 'rainbow' require 'jasmine/cli' include Jasmine::CLI @@ -73,7 +75,14 @@ files = files.flatten.compact.collect { |file| when '.js' %{} when '.coffee' - %{} + begin + %{} + rescue CoffeeScript::CompilationError => e + puts "[%s] %s: %s" % [ 'coffeescript'.color(:red), file.color(:yellow), e.message.color(:white) ] + exit 1 + ensure + fh.close + end when '.css' %{} end diff --git a/jasmine-headless-webkit.gemspec b/jasmine-headless-webkit.gemspec index da6959c..7a7bc62 100644 --- a/jasmine-headless-webkit.gemspec +++ b/jasmine-headless-webkit.gemspec @@ -22,4 +22,5 @@ Gem::Specification.new do |s| s.add_dependency 'jasmine' s.add_dependency 'coffee-script' + s.add_dependency 'rainbow' end