Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
## Testing in a real terminal

The recommended way to test node-pty during development is to clone the xterm.js repository and link's node-pty module to this directory.
The recommended way to test node-pty during development is via the electron example:

```sh
cd examples/electron
npm ci
npm start
```

Alternatively, clone the xterm.js repository and link's node-pty module to this directory.

1. Clone xterm.js in a separate folder:
```sh
Expand Down
4 changes: 2 additions & 2 deletions examples/electron/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<head>
<meta charset="UTF-8">
<title>node-pty Electron example</title>
<link rel="Stylesheet" href="./node_modules/xterm/css/xterm.css">
<link rel="Stylesheet" href="./node_modules/@xterm/xterm/css/xterm.css">
</head>
<body>
<div id="xterm"></div>
<script src="./node_modules/xterm/lib/xterm.js"></script>
<script src="./node_modules/@xterm/xterm/lib/xterm.js"></script>
<script type="module" src="./renderer.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion examples/electron/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { app, BrowserWindow, ipcMain } = require('electron');
const path = require('path');
const os = require('os');
const pty = require('node-pty');
const pty = require('../..');

let mainWindow;
let ptyProcess;
Expand Down
37 changes: 11 additions & 26 deletions examples/electron/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions examples/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"repository": "https://github.com/microsoft/node-pty",
"author": "Tyriar",
"dependencies": {
"electron": "^35.7.5",
"node-pty": "^1.0.0",
"xterm": "^5.0.0"
"@xterm/xterm": "^6.0.0",
"electron": "^35.7.5"
}
}
Loading