Simplify readline setup for Windows users

This commit is contained in:
Andrew Stewart 2013-11-11 07:54:51 -05:00
parent 19929842a2
commit 31bfa85fa8
2 changed files with 4 additions and 6 deletions

7
dist/cylon.js vendored
View File

@ -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

View File

@ -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