added warning that we need node 0.8+ to run repl

remove unnecessary parens and else statement in repl

we do this by convention of the main coffee source

fix: exit should be process.exit

compiled and build full
This commit is contained in:
Wil Chung
2013-03-12 16:06:38 -07:00
parent 9b6772a390
commit 70e83030a7
2 changed files with 14 additions and 1 deletions

View File

@@ -78,6 +78,12 @@ addMultilineHandler = (repl) ->
module.exports =
start: (opts = {}) ->
[major, minor, build] = process.version[1..].split('.').map (n) -> parseInt(n)
if major is 0 and minor <= 7
console.warn "Node 0.8.0+ required for coffeescript REPL"
process.exit 1
opts = merge replDefaults, opts
repl = nodeREPL.start opts
repl.on 'exit', -> repl.outputStream.write '\n'