]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Updated LICENSE and REAMDE
authorparis <pariskasidiaris@gmail.com>
Mon, 24 Mar 2014 16:11:27 +0000 (16:11 +0000)
committerparis <pariskasidiaris@gmail.com>
Mon, 24 Mar 2014 16:11:27 +0000 (16:11 +0000)
Also removed useless files.

.npmignore [deleted file]
LICENSE
Makefile [deleted file]
README.md
example/index.html [deleted file]
example/index.js [deleted file]
index.js [deleted file]
lib/index.js [deleted file]
package.json [deleted file]

diff --git a/.npmignore b/.npmignore
deleted file mode 100644 (file)
index 8961f80..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-.git*
-build/
-.lock-wscript
-out/
-Makefile.gyp
-*.Makefile
-*.target.gyp.mk
-node_modules/
-img/
-test/
-*.node
-example/*.log
diff --git a/LICENSE b/LICENSE
index 259500c93ce21b18a707c66f2eb296809b29638d..1ed6f2a573f5fd7c8ded2ba6eabffb3b43b3f0d2 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -1,3 +1,4 @@
+Copyright (c) 2014, sourceLair Limited (https://github.com/sourcelair/)
 Copyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/)
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index a425d1c..0000000
--- a/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-all:
-       @cp src/term.js term.js
-       @uglifyjs -o term.min.js term.js
-
-clean:
-       @rm term.js
-       @rm term.min.js
-
-bench:
-       @node test/bench
-
-.PHONY: clean all
index 49a2c6fdadaed66801db8c6229f21a7b82bd709f..e8483eaaf9b5039b492642bf291caf29224cf254 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,74 +1,6 @@
-# term.js
+# xterm.js
 
-A full xterm clone written in javascript. Used by
-[**tty.js**](https://github.com/chjj/tty.js).
-
-## Example
-
-Server:
-
-``` js
-var term = require('term.js');
-app.use(term.middleware());
-...
-```
-
-Client:
-
-``` js
-window.addEventListener('load', function() {
-  var socket = io.connect();
-  socket.on('connect', function() {
-    var term = new Terminal({
-      cols: 80,
-      rows: 24,
-      screenKeys: true
-    });
-
-    term.on('data', function(data) {
-      socket.emit('data', data);
-    });
-
-    term.on('title', function(title) {
-      document.title = title;
-    });
-
-    term.open(document.body);
-
-    term.write('\x1b[31mWelcome to term.js!\x1b[m\r\n');
-
-    socket.on('data', function(data) {
-      term.write(data);
-    });
-
-    socket.on('disconnect', function() {
-      term.destroy();
-    });
-  });
-}, false);
-```
-
-## Tmux-like
-
-While term.js has always supported copy/paste using the mouse, it now also
-supports several keyboard based solutions for copy/paste.
-
-term.js includes a tmux-like selection mode (enabled with the `screenKeys`
-option) which makes copy and paste very simple. `Ctrl-A` enters `prefix` mode,
-from here you can type `Ctrl-V` to paste. Press `[` in prefix mode to enter
-selection mode. To select text press `v` (or `space`) to enter visual mode, use
-`hjkl` to navigate and create a selection, and press `Ctrl-C` to copy.
-
-`Ctrl-C` (in visual mode) and `Ctrl-V` (in prefix mode) should work in any OS
-for copy and paste. `y` (in visual mode) will work for copying only on X11
-systems. It will copy to the primary selection.
-
-Note: `Ctrl-C` will also work in prefix mode for the regular OS/browser
-selection. If you want to select text with your mouse and copy it to the
-clipboard, simply select the text and type `Ctrl-A + Ctrl-C`, and
-`Ctrl-A + Ctrl-V` to paste it.
-
-For mac users: consider `Ctrl` to be `Command/Apple` above.
+xterm, in the browser.
 
 ### Contribution and License Agreement
 
diff --git a/example/index.html b/example/index.html
deleted file mode 100644 (file)
index 10b67c1..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-<!doctype html>
-<title>term.js</title>
-<!--
-  term.js
-  Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
--->
-<style>
-  html {
-    background: #555;
-  }
-
-  h1 {
-    margin-bottom: 20px;
-    font: 20px/1.5 sans-serif;
-  }
-
-/*
-  .terminal {
-    float: left;
-    border: #000 solid 5px;
-    font-family: "DejaVu Sans Mono", "Liberation Mono", monospace;
-    font-size: 11px;
-    color: #f0f0f0;
-    background: #000;
-  }
-
-  .terminal-cursor {
-    color: #000;
-    background: #f0f0f0;
-  }
-*/
-</style>
-<h1>term.js</h1>
-<script src="/socket.io/socket.io.js"></script>
-<script src="term.js"></script>
-<script>
-;(function() {
-  window.onload = function() {
-    var socket = io.connect();
-    socket.on('connect', function() {
-      var term = new Terminal({
-        cols: 80,
-        rows: 24,
-        useStyle: true,
-        screenKeys: true
-      });
-
-      term.on('data', function(data) {
-        socket.emit('data', data);
-      });
-
-      term.on('title', function(title) {
-        document.title = title;
-      });
-
-      term.open(document.body);
-
-      term.write('\x1b[31mWelcome to term.js!\x1b[m\r\n');
-
-      socket.on('data', function(data) {
-        term.write(data);
-      });
-
-      socket.on('disconnect', function() {
-        term.destroy();
-      });
-    });
-  };
-}).call(this);
-</script>
diff --git a/example/index.js b/example/index.js
deleted file mode 100755 (executable)
index c3b3b8b..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/usr/bin/env node
-
-/**
- * term.js
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
- */
-
-var http = require('http')
-  , express = require('express')
-  , io = require('socket.io')
-  , pty = require('pty.js')
-  , terminal = require('../');
-
-/**
- * term.js
- */
-
-process.title = 'term.js';
-
-/**
- * Dump
- */
-
-var stream;
-if (process.argv[2] === '--dump') {
-  stream = require('fs').createWriteStream(__dirname + '/dump.log');
-}
-
-/**
- * Open Terminal
- */
-
-var buff = []
-  , socket
-  , term;
-
-term = pty.fork(process.env.SHELL || 'sh', [], {
-  name: require('fs').existsSync('/usr/share/terminfo/x/xterm-256color')
-    ? 'xterm-256color'
-    : 'xterm',
-  cols: 80,
-  rows: 24,
-  cwd: process.env.HOME
-});
-
-term.on('data', function(data) {
-  if (stream) stream.write('OUT: ' + data + '\n-\n');
-  return !socket
-    ? buff.push(data)
-    : socket.emit('data', data);
-});
-
-console.log(''
-  + 'Created shell with pty master/slave'
-  + ' pair (master: %d, pid: %d)',
-  term.fd, term.pid);
-
-/**
- * App & Server
- */
-
-var app = express()
-  , server = http.createServer(app);
-
-app.use(function(req, res, next) {
-  var setHeader = res.setHeader;
-  res.setHeader = function(name) {
-    switch (name) {
-      case 'Cache-Control':
-      case 'Last-Modified':
-      case 'ETag':
-        return;
-    }
-    return setHeader.apply(res, arguments);
-  };
-  next();
-});
-
-app.use(express.basicAuth(function(user, pass, next) {
-  if (user !== 'foo' || pass !== 'bar') {
-    return next(true);
-  }
-  return next(null, user);
-}));
-
-app.use(express.static(__dirname));
-app.use(terminal.middleware());
-
-if (!~process.argv.indexOf('-n')) {
-  server.on('connection', function(socket) {
-    var address = socket.remoteAddress;
-    if (address !== '127.0.0.1' && address !== '::1') {
-      try {
-        socket.destroy();
-      } catch (e) {
-        ;
-      }
-      console.log('Attempted connection from %s. Refused.', address);
-    }
-  });
-}
-
-server.listen(8080);
-
-/**
- * Sockets
- */
-
-io = io.listen(server, {
-  log: false
-});
-
-io.sockets.on('connection', function(sock) {
-  socket = sock;
-
-  socket.on('data', function(data) {
-    if (stream) stream.write('IN: ' + data + '\n-\n');
-    term.write(data);
-  });
-
-  socket.on('disconnect', function() {
-    socket = null;
-  });
-
-  while (buff.length) {
-    socket.emit('data', buff.shift());
-  }
-});
diff --git a/index.js b/index.js
deleted file mode 100644 (file)
index bf4d18a..0000000
--- a/index.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('./lib/index.js');
diff --git a/lib/index.js b/lib/index.js
deleted file mode 100644 (file)
index 4a18fc2..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * term.js - an xterm emulator
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
- * https://github.com/chjj/term.js
- */
-
-function term(options) {
-  return new term.Terminal(options);
-}
-
-term.middleware = function(options) {
-  var url = require('url');
-
-  options = options || {};
-  options.path = options.path || '/term.js';
-
-  return function(req, res, next) {
-    if (url.parse(req.url).pathname !== options.path) {
-      return next();
-    }
-
-    if (+new Date(req.headers['if-modified-since']) === term.last) {
-      res.statusCode = 304;
-      res.end();
-      return;
-    }
-
-    res.writeHead(200, {
-      'Content-Type': 'application/javascript; charset=utf-8',
-      'Content-Length': Buffer.byteLength(term.script),
-      'Last-Modified': term.last
-    });
-
-    res.end(term.script);
-  };
-};
-
-term.path = __dirname + '/../src/term.js';
-
-term.__defineGetter__('script', function() {
-  if (term._script) return term._script;
-  term.last = +new Date;
-  return term._script = require('fs').readFileSync(term.path, 'utf8');
-});
-
-term.__defineGetter__('Terminal', function() {
-  if (term._Terminal) return term._Terminal;
-  return term._Terminal = require('../src/term');
-});
-
-/**
- * Expose
- */
-
-module.exports = term;
diff --git a/package.json b/package.json
deleted file mode 100644 (file)
index 2039695..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-{
-  "name": "term.js",
-  "description": "A terminal written in javascript",
-  "author": "Christopher Jeffrey",
-  "version": "0.0.3",
-  "main": "./index.js",
-  "preferGlobal": false,
-  "repository": "git://github.com/chjj/term.js.git",
-  "homepage": "https://github.com/chjj/term.js",
-  "bugs": { "url": "https://github.com/chjj/term.js/issues" },
-  "keywords": ["tty", "terminal", "term", "xterm"],
-  "tags": ["tty", "terminal", "term", "xterm"],
-  "engines": { "node": ">= 0.8.0" },
-  "devDependencies": {
-    "express": "3.1.0",
-    "socket.io": "0.9.13",
-    "pty.js": "0.2.3"
-  }
-}