Skip to content

Commit

Permalink
Update example xterm to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyriar committed Sep 11, 2019
1 parent 347f5dd commit 0815402
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/electron/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>node-pty Electron example</title>
<link rel="Stylesheet" href="./node_modules/xterm/lib/xterm.css">
<link rel="Stylesheet" href="./node_modules/xterm/css/xterm.css">
</head>
<body>
<div id="xterm"></div>
Expand Down
2 changes: 1 addition & 1 deletion examples/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"dependencies": {
"electron": "4.0.1",
"node-pty": "^0.8.0",
"xterm": "^3.14.0"
"xterm": "^4.0.0"
}
}
4 changes: 1 addition & 3 deletions examples/electron/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ const xterm = new Terminal();
xterm.open(document.getElementById('xterm'));

// Setup communication between xterm.js and node-pty
xterm.on('data', (data) => {
ptyProcess.write(data);
});
xterm.onData(data => ptyProcess.write(data));
ptyProcess.on('data', function (data) {
xterm.write(data);
});

0 comments on commit 0815402

Please sign in to comment.