Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 05a4cc94582c3a7177de7e4aed7b14f0cab09db2 1 parent 41548d2
@defunkt authored
Showing with 2 additions and 4 deletions.
  1. +2 −4 bin/lyndon
View
6 bin/lyndon
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.