-async = require 'async'
-fs = require 'fs'
+# this file is used by the client and server.
+
+# work around lack of module system in the browser:
+if exports?
+ my_exports = exports
+else
+ window.terminal = {}
+ my_exports = window.terminal
class Terminal
# public:
return -1 unless parts?
return parts[0].length
-exports.new = (width, height) ->
+my_exports.new = (width, height) ->
return new Terminal width, height