Skip to content

Instantly share code, notes, and snippets.

@rprichard
Created December 18, 2015 02:56
Show Gist options
  • Select an option

  • Save rprichard/a4b731827b1bef9436aa to your computer and use it in GitHub Desktop.

Select an option

Save rprichard/a4b731827b1bef9436aa to your computer and use it in GitHub Desktop.
1. In an empty directory, check out:
$ git clone -bwindows_fixes https://github.com/rprichard/tty.js.git
$ git clone -bwindows_fixes https://github.com/rprichard/pty.js.git
$ (cd pty.js/deps && rm -fr winpty)
$ (cd pty.js/deps && git clone -bnodejs_fix https://github.com/rprichard/winpty.git)
2. Establish an npm link from your user-global repo to your pty.js:
$ (cd pty.js && npm link)
3. Establish an npm link from tty.js to the user-global pty.js link:
$ (cd tty.js && npm link pty.js)
4. Run npm install to compile everything:
$ (cd tty.js && npm install)
5. Run npm (make sure you're not in a Cygwin shell, because Cygwin will define the SHELL variable):
$ cd tty.js
$ node bin/tty.js
[tty.js] Listening on port 8080.
6. Connect to localhost:8080 and click "Open Terminal".
@rprichard

Copy link
Copy Markdown
Author

PS: The "npm link" creates a JUNCTION inside your home directory, e.g.:

C:\Users\rprichard>cd \Users\rprichard\AppData\Roaming\npm\node_modules

C:\Users\rprichard\AppData\Roaming\npm\node_modules>dir
 Volume in drive C has no label.
 Volume Serial Number is A4DA-B145

 Directory of C:\Users\rprichard\AppData\Roaming\npm\node_modules

12/17/2015  08:53 PM    <DIR>          .
12/17/2015  08:53 PM    <DIR>          ..
12/17/2015  08:53 PM    <JUNCTION>     pty.js [C:\rprichard\TEST\pty.js]
               0 File(s)              0 bytes
               3 Dir(s)  50,925,400,064 bytes free

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment