Permalink
Browse files

no -d, just check for .js or .html

  • Loading branch information...
1 parent 41548d2 commit 05a4cc94582c3a7177de7e4aed7b14f0cab09db2 @defunkt committed Jun 26, 2009
Showing with 2 additions and 4 deletions.
  1. +2 −4 bin/lyndon
View
@@ -8,15 +8,13 @@ require 'lyndon/repl'
case ARGV.first
when '-h', '--help'
- puts "Run it:" ," $ lyndon -e '(string to eval)'", " $ lyndon -p '(string to eval; result will puts)'", " $ lyndon file.lyndon", " $ lyndon"
+ puts "Run it:" ," $ lyndon -e '(string to eval)'", " $ lyndon -p '(string to eval; result will puts)'", " $ lyndon file.js", "$ lyndon file.html", "$ lyndon"
when '-e'
Lyndon.eval(ARGV.last)
when '-p'
puts Lyndon.eval(ARGV.last)
-when '-d'
- Lyndon::Repl.start(ARGV.last)
when nil
Lyndon::Repl.start
else
- Lyndon.eval_file(ARGV.last)
+ ARGV[-1][/\.js$/] ? Lyndon.eval_file(ARGV.last) : Lyndon::Repl.start(ARGV.last)
end

0 comments on commit 05a4cc9

Please sign in to comment.