Simplify readline setup for Windows users
This commit is contained in:
parent
19929842a2
commit
31bfa85fa8
|
@ -9,7 +9,7 @@
|
|||
|
||||
(function() {
|
||||
'use strict';
|
||||
var Cylon, readLine,
|
||||
var Cylon,
|
||||
__slice = [].slice,
|
||||
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
|
||||
|
||||
|
@ -19,8 +19,6 @@
|
|||
|
||||
require('./api');
|
||||
|
||||
readLine = require("readline");
|
||||
|
||||
Logger.setup();
|
||||
|
||||
Cylon = (function() {
|
||||
|
@ -54,9 +52,10 @@
|
|||
|
||||
function Master() {
|
||||
this.robot = __bind(this.robot, this);
|
||||
var rl;
|
||||
var readLine, rl;
|
||||
this.self = this;
|
||||
if (process.platform === "win32") {
|
||||
readLine = require("readline");
|
||||
rl = readLine.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
|
|
|
@ -12,8 +12,6 @@ require('./utils')
|
|||
require('./logger')
|
||||
require('./api')
|
||||
|
||||
readLine = require "readline"
|
||||
|
||||
Logger.setup()
|
||||
|
||||
# Cylon is the global namespace for the project, and also in charge of
|
||||
|
@ -41,6 +39,7 @@ class Cylon
|
|||
constructor: ->
|
||||
@self = this
|
||||
if process.platform is "win32"
|
||||
readLine = require "readline"
|
||||
rl = readLine.createInterface
|
||||
input: process.stdin
|
||||
output: process.stdout
|
||||
|
|
Loading…
Reference in New Issue