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:
parent
9b6772a390
commit
70e83030a7
|
@ -88,10 +88,17 @@
|
|||
|
||||
module.exports = {
|
||||
start: function(opts) {
|
||||
var repl;
|
||||
var build, major, minor, repl, _ref1;
|
||||
if (opts == null) {
|
||||
opts = {};
|
||||
}
|
||||
_ref1 = process.version.slice(1).split('.').map(function(n) {
|
||||
return parseInt(n);
|
||||
}), major = _ref1[0], minor = _ref1[1], build = _ref1[2];
|
||||
if (major === 0 && 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', function() {
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue