-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example how to use it in an Electron app #55
Comments
Looks like you're passing in the wrong arguments somehow? I'd need to see the specific call. On explaining how to use, I try to do this on the README by suggesting a project I also maintain xterm.js:
Which contains a usage example as a demo https://github.com/sourcelair/xterm.js, could probably also do something here to show how to make a simple Electron terminal app using node-pty and xterm.js. |
This is what I'm trying
I have it working with spawning a |
You can check out exactly how I do it in VS Code here https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/terminal/electron-browser/terminalProcess.js Note that Nothing looks particularly bad with your current setup, maybe something is going wrong in the way you're transferring the data between node-pty and xterm.js? I expect something like this: xterm.on('data', (data) => {
pty.write(data);
});
pty.on('data', function (data) {
xterm.write(data);
}); |
Cool, I will have a look! |
Holy moly! it just worked 🚀 |
I saw that you used the form
So I changed my so suddenly I got typescript help and I had ofc an error
Thank for this great library! |
Great! 😄 |
@stoffeastrom while making an electron example I ran into exactly what you hit with |
@stoffeastrom thanks for the suggestion, added the example to https://github.com/Tyriar/node-pty/tree/master/examples/electron |
When I try to
fork
orspawn
in an Electron app I getThe text was updated successfully, but these errors were encountered: