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:
parent
c2d1ae06c5
commit
a133e018cc
3 changed files with 3 additions and 3 deletions
|
@ -43,7 +43,7 @@
|
||||||
return compile_script('console', sources[0]);
|
return compile_script('console', sources[0]);
|
||||||
}
|
}
|
||||||
if (!(sources.length)) {
|
if (!(sources.length)) {
|
||||||
return usage();
|
return require('./repl');
|
||||||
}
|
}
|
||||||
separator = sources.indexOf('--');
|
separator = sources.indexOf('--');
|
||||||
flags = [];
|
flags = [];
|
||||||
|
|
|
@ -51,7 +51,7 @@ exports.run: ->
|
||||||
return require './repl' if options.interactive
|
return require './repl' if options.interactive
|
||||||
return compile_stdio() if options.stdio
|
return compile_stdio() if options.stdio
|
||||||
return compile_script 'console', sources[0] if options.eval
|
return compile_script 'console', sources[0] if options.eval
|
||||||
return usage() unless sources.length
|
return require './repl' unless sources.length
|
||||||
separator: sources.indexOf '--'
|
separator: sources.indexOf '--'
|
||||||
flags: []
|
flags: []
|
||||||
if separator >= 0
|
if separator >= 0
|
||||||
|
|
|
@ -1395,7 +1395,7 @@ UTILITIES: {
|
||||||
|
|
||||||
# Shortcuts to speed up the lookup time for native functions.
|
# Shortcuts to speed up the lookup time for native functions.
|
||||||
__hasProp: 'Object.prototype.hasOwnProperty'
|
__hasProp: 'Object.prototype.hasOwnProperty'
|
||||||
__slice: 'Array.prototype.slice'
|
__slice: 'Array.prototype.slice'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue