diff --git a/.gitignore b/.gitignore index 078df04a..d622804e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ dist lib/handlebars/parser.js vendor .rvmrc +.DS_Store diff --git a/Rakefile b/Rakefile index d78f1acb..ebb03bd6 100644 --- a/Rakefile +++ b/Rakefile @@ -2,8 +2,12 @@ require "rubygems" require "bundler/setup" file "lib/handlebars/parser.js" => ["src/handlebars.yy","src/handlebars.l"] do - system "jison src/handlebars.yy src/handlebars.l" - sh "mv handlebars.js lib/handlebars/parser.js" + if ENV['PATH'].split(':').any? {|folder| File.exists?(folder+'/jison')} + system "jison src/handlebars.yy src/handlebars.l" + sh "mv handlebars.js lib/handlebars/parser.js" + else + puts "Jison is not installed. Try running `npm install jison`." + end end task :compile => "lib/handlebars/parser.js"