{"action":"closed","issue":{"url":"https://api.github.com/repos/rollup/rollup/issues/598","repository_url":"https://api.github.com/repos/rollup/rollup","labels_url":"https://api.github.com/repos/rollup/rollup/issues/598/labels{/name}","comments_url":"https://api.github.com/repos/rollup/rollup/issues/598/comments","events_url":"https://api.github.com/repos/rollup/rollup/issues/598/events","html_url":"https://github.com/rollup/rollup/issues/598","id":146397361,"number":598,"title":"Command line client does not work as expected","user":{"login":"ceremcem","id":6639874,"avatar_url":"https://avatars.githubusercontent.com/u/6639874?v=3","gravatar_id":"","url":"https://api.github.com/users/ceremcem","html_url":"https://github.com/ceremcem","followers_url":"https://api.github.com/users/ceremcem/followers","following_url":"https://api.github.com/users/ceremcem/following{/other_user}","gists_url":"https://api.github.com/users/ceremcem/gists{/gist_id}","starred_url":"https://api.github.com/users/ceremcem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceremcem/subscriptions","organizations_url":"https://api.github.com/users/ceremcem/orgs","repos_url":"https://api.github.com/users/ceremcem/repos","events_url":"https://api.github.com/users/ceremcem/events{/privacy}","received_events_url":"https://api.github.com/users/ceremcem/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-06T18:30:50Z","updated_at":"2016-04-06T19:07:30Z","closed_at":"2016-04-06T19:07:30Z","body":"Hi, \r\n\r\nI'm trying to make a bundle from the following code by issuing `rollup -i app.js -o app.bundle.js`: \r\n\r\n```\r\n// Generated by LiveScript 1.4.0\r\nvar wifi, net, ser, drop, callAfter, connectToServer, connectToWifi, setupI2c, r, r2, detachRepl, onInit;\r\nwifi = require('Wifi');\r\nnet = require('net');\r\nser = Serial1;\r\ndrop = function(n, xs){\r\n  if (n <= 0) {\r\n    return xs;\r\n  } else {\r\n    return xs.slice(n);\r\n  }\r\n};\r\ncallAfter = function(delay, func){\r\n  setTimeout(func, delay);\r\n};\r\nconnectToServer = function(){\r\n  net.connect({\r\n    host: \"aktos.io\",\r\n    port: 1235\r\n  }, function(socket){\r\n    console.log(\"client connected. \");\r\n    ser.removeAllListeners();\r\n    ser.setup(115200);\r\n    ser.on('data', function(data){\r\n      socket.write(data);\r\n    });\r\n    socket.on('data', function(data){\r\n      ser.write(data);\r\n    });\r\n    socket.on('end', function(){\r\n      console.log(\"client disconnected, trying to reconnect...\");\r\n      callAfter(2000, connectToServer);\r\n    });\r\n  });\r\n};\r\nconnectToWifi = function(){\r\n  wifi.connect('aea', {\r\n    password: 'uieaaauiea'\r\n  }, function(err){\r\n    console.log(\"connected? err=\", err, \"info\", wifi.getIP());\r\n    callAfter(2000, connectToServer);\r\n  });\r\n  wifi.stopAP();\r\n};\r\nsetupI2c = function(){\r\n  console.log(\"Setting up I2C1..\");\r\n  I2C1.setup({\r\n    sda: D12,\r\n    scl: D13\r\n  });\r\n};\r\nr = function(quantity){\r\n  return I2C1.readFrom(0x40, quantity);\r\n};\r\nr2 = function(start_addr, quantity){\r\n  var all;\r\n  start_addr == null && (start_addr = 0);\r\n  quantity == null && (quantity = 1);\r\n  all = I2C1.readFrom(0x40, quantity);\r\n  console.log(\"all: \", all);\r\n  return drop(start_addr(all));\r\n};\r\ndetachRepl = function(){\r\n  console.log(\"Disabling REPL console!\");\r\n  LoopbackA.setConsole();\r\n};\r\nonInit = function(){\r\n  connectToWifi();\r\n  setupI2c();\r\n};\r\n```\r\n\r\nBut the output is as follows: \r\n\r\n```\r\n// Generated by LiveScript 1.4.0\r\nvar wifi;\r\nvar net;\r\nwifi = require('Wifi');\r\nnet = require('net');\r\n```"}}