The recommended way to test node-pty during development is via the electron example:
cd examples/electron
npm ci
npm startAlternatively, clone the xterm.js repository and link's node-pty module to this directory.
- Clone xterm.js in a separate folder:
git clone https://github.com/xtermjs/xterm.js npm ci npm run setup
- Link the node-pty repo:
rm -rf node_modules/node-pty # in xterm.js folder ln -s <path_to_node-pty> <path to xtermjs>/node_modules/node-pty - Hit ctrl/cmd+shift+b in VS Code or run the build/demo scripts manually:
npm run tsc-watch # build ts npm run esbuild-watch # bundle ts/js npm run esbuild-demo # build demo/server npm run start # run server
- Open http://127.0.0.1:3000 and test
- Kill and restart the
npm run startcommand to apply any changes made in node-pty