From 6900bbc07ac0041a1e336db953ae7584a2adcb07 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 9 Jul 2018 09:24:07 -0700 Subject: [PATCH 1/2] Move developer documentation to the wiki --- README.md | 91 ++----------------------------------------------------- 1 file changed, 2 insertions(+), 89 deletions(-) diff --git a/README.md b/README.md index 1122c59c..f5802878 100644 --- a/README.md +++ b/README.md @@ -156,102 +156,15 @@ computational environment for Jupyter, supporting interactive data science and s Do you use xterm.js in your application as well? Please [open a Pull Request](https://github.com/sourcelair/xterm.js/pulls) to include it here. We would love to have it in our list. Note: Please add any new contributions to the end of the list only. -## Demo - -Xterm.js ships with a barebones demo implementation, designed for the development and evaluation of the library only. Exposing the demo to the public as is would introduce security risks for the host. - -Below you can find instructions on how to run the demo on different platforms. - -### SourceLair - -SourceLair will run the demo and builder in parallel automatically. Just make sure to choose the "Node.js" project type, when cloning the xterm.js repo (or just use this shortcut; https://lair.io/xtermjs/xtermjs). - -Then open your project's [Public URL](https://help.sourcelair.com/projects/the-public-url/) to access the demo. - -### Docker - -First, make sure you have Docker Engine 1.13.0 (or newer) and Docker Compose 1.10.0 (or newer). - -Xterm.js [provides a pre-built Docker image](https://hub.docker.com/r/xtermjs/xterm.js/) to help run the demo easily (Git tags are built as [tagged Docker images](https://hub.docker.com/r/xtermjs/xterm.js/tags/) too). - -To run the just demo (with no editing access). run the following command in your terminal: - -``` -docker run -p 3000:3000 xtermjs/xterm.js -``` - -Then open http://0.0.0.0:3000 in a web browser to access the demo. - -To run the demo and builder in parallel, run the following command in your terminal: - -``` -docker-compose up -``` - -Then open http://0.0.0.0:3000 in a web browser to access the demo. If you prefer a different port than `3000` to access the xterm.js demo, then set the `XTERMJS_PORT` environment variable to the desired port. - -### Foreman (or other Procfile runner) - -First, be sure that a C++ compiler such as GCC-C++ or Clang is installed, then run the following commands in your terminal: - -``` -npm install -foreman start # Replace foreman with "honcho", "forego" etc. depending on your runner -``` - -Then open http://0.0.0.0:3000 in a web browser to access the demo. - -### Linux or macOS - -First, be sure that a C++ compiler such as GCC-C++ or Clang is installed, then run the following commands in your terminal: - -``` -npm install -npm start # Run this in its own terminal -npm run watch # Run this in its own terminal -``` - -Then open http://0.0.0.0:3000 in a web browser to access the demo. - -### Windows - -First, ensure [node-gyp](https://github.com/nodejs/node-gyp) is installed and configured correctly, then run the following commands in your terminal: - -``` -npm install -npm start # Run this in its own terminal -npm run watch # Run this in its own terminal -``` - -Then open http://127.0.0.1:3000 in a web browser to access the demo. - -*Note: Do not use ConEmu, as it seems to break the demo for some reason.* - -## Testing - -Tests are run using the following npm scripts: - -- `npm test`: This will run both unit tests and the linter -- `npm run test-suite `: This will run all tests within a particular file, <file> is the test file name excluding the extension (eg. "Linkifier.test") -- `npm run test-debug`: This will run unit tests with `--inspect-brk`, this can then be automatically debugged using [VS Code auto attach](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_auto-attach-feature) or manually attached to by a debugger -- `npm run test-coverage`: This will run all unit tests and produce a coverage report -- `npm run lint`: This will run the linter only - ## Releases Xterm.js follows a monthly release cycle roughly. The existing releases are available at this GitHub repo's [Releases](https://github.com/sourcelair/xterm.js/releases), while the roadmap is available as [Milestones](https://github.com/sourcelair/xterm.js/milestones). -## Development and Contribution +## Contributing -Xterm.js is maintained by [SourceLair](https://www.sourcelair.com/) and a few external contributors, but we would love to receive contributions from everyone! - -To contribute either code, documentation or issues to xterm.js please read the [Contributing document](CONTRIBUTING.md) beforehand. The development of xterm.js does not require any special tool. All you need is an editor that supports JavaScript/TypeScript and a browser. You will need Node.js installed locally to get all the features working in the demo. - -### Code structure - -`src/` is roughly split up into areas of functionality such as `renderer/` that handles all rendering and `utils/` which provides general utility functions. The `shared/` folder contains code that can be used from either the main thread or a web worker thread, all code inside a `shared/` folder should only ever import other code from a `shared/` folder to minimize the amount of code ran when launching a web worker. +You can read the [guide on the wiki](https://github.com/xtermjs/xterm.js/wiki/Contributing) to learn how to contribute and setup xterm.js for development. ## License Agreement From dfb1b4db95f1bf20d994b53ae97f03922ef9b178 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Mon, 9 Jul 2018 09:25:35 -0700 Subject: [PATCH 2/2] Move third party deps note to wiki --- CONTRIBUTING.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4aebdf20..8b33d183 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,7 +50,3 @@ By contributing code to xterm.js you holder has explicitly granted the right to use it like this, through a compatible open source license or through a direct agreement with you.) - -### Third party dependencies - -We prefer to not include any non-dev third party dependencies in order to keep our code minimal, performant and secure. If you plan on adding a dependency on a third party library it's a good idea to discuss the need in an issue with the maintainers first.