broken cuz moving to addon

This commit is contained in:
Felipe Gasper
2017-10-16 14:43:10 +01:00
parent 8346ab12be
commit a6efda6120
6 changed files with 14 additions and 5 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
[submodule "zmodemjs"]
path = demo/zmodemjs
path = src/addons/zmodem/zmodemjs
url = https://github.com/FGasper/zmodemjs.git
+8 -1
View File
@@ -29,10 +29,17 @@ app.get('/js/*.js', function(req, res){
res.sendFile(__dirname + req.url);
});
var shell_args = {
bash: ['--login'],
'cmd.exe': [],
};
var shell_name = process.platform === 'win32' ? 'cmd.exe' : 'bash';
app.post('/terminals', function (req, res) {
var cols = parseInt(req.query.cols),
rows = parseInt(req.query.rows),
term = pty.spawn(process.platform === 'win32' ? 'cmd.exe' : 'bash', [], {
term = pty.spawn(shell_name, shell_args[shell_name], {
encoding: null,
name: 'xterm-color',
cols: cols || 80,
+1 -1
View File
@@ -16,7 +16,7 @@
<!-- Edge needs this, as of late 2017 -->
<script src="/js/text-encoding.js"></script>
<script src="/zmodemjs/zmodem.js"></script>
<script src="zmodemjs/dist/zmodem.js"></script>
</head>
<body>
<h1>xterm.js: xterm, in the browser</h1>
+3 -1
View File
@@ -294,12 +294,14 @@ function handleWSMessage(evt) {
//var text_encoder = new TextEncoder();
function runRealTerminal() {
//term.attach(socket);
term.attach(socket, false);
/*
term.on("data", (d) => {
//socket.send( text_encoder.encode(d) );
socket.send(d);
});
*/
term._initialized = true;
}
Submodule demo/zmodemjs deleted from cea252d19b