1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

Making the REPL the default behaviour of 'coffee', when called with no arguments, a-la Node and Python.

This commit is contained in:
Jeremy Ashkenas 2010-06-12 11:09:30 -04:00
parent c2d1ae06c5
commit a133e018cc
3 changed files with 3 additions and 3 deletions

View file

@ -43,7 +43,7 @@
return compile_script('console', sources[0]);
}
if (!(sources.length)) {
return usage();
return require('./repl');
}
separator = sources.indexOf('--');
flags = [];

View file

@ -51,7 +51,7 @@ exports.run: ->
return require './repl' if options.interactive
return compile_stdio() if options.stdio
return compile_script 'console', sources[0] if options.eval
return usage() unless sources.length
return require './repl' unless sources.length
separator: sources.indexOf '--'
flags: []
if separator >= 0