Teascade.net/public/terminal
Sofia ed20985893 Update css configs 2018-04-20 09:16:01 +03:00
..
audio Update css configs 2018-04-20 09:16:01 +03:00
css Update css configs 2018-04-20 09:16:01 +03:00
js Update css configs 2018-04-20 09:16:01 +03:00
lib Update css configs 2018-04-20 09:16:01 +03:00
scss Update css configs 2018-04-20 09:16:01 +03:00
ts Update css configs 2018-04-20 09:16:01 +03:00
COPYING Update css configs 2018-04-20 09:16:01 +03:00
COPYING-GPL Update css configs 2018-04-20 09:16:01 +03:00
README.md Update css configs 2018-04-20 09:16:01 +03:00
index.html Update css configs 2018-04-20 09:16:01 +03:00
tsconfig.json Update css configs 2018-04-20 09:16:01 +03:00

README.md

JavaScript Terminal

JavaScript Terminal is a fun-project which allows people to create command line apps (like they would regularly in Python on Java) but in JavaScript.

To get quickly started:

Okay, so what is it?

The JavaScript Terminal is split into three major components

  • jsterminal.ts is the actual engine which displays the terminal and is able to draw text at certain style to a point on the terminal. It doesn't know any of the regular text-wrapping logic etc.
  • jash.ts is the bash of jsterminal.ts. Jash knows all of the text-wrapping logics, how 'history' should work and knows how to give print/println/readline to Std.IO
  • jsx.ts is the final abstraction layer on top of all. This is probably neglected by many, but it's an "emulation" of the UNIX bash. It knows how to take commands and can traverse through directories even run commands and launch files. (Though all of this is happening in a virtualized file-system contained in RAM and possibly in cookies)

If you start working with this engine you should probably use TypeScript. It's a superset of JavaScript, but if you insist on working with JavaScript, that works out too, because TypeScript compiles to JavaScript!

So how do I build it?

To run the engine you need TypeScript to build the sources into browser-compatible JavaScript and SASS to compile the sass into browser-compatible css. After that you're ready to go! I recommen building the JavaScript into ES6 because it's just superior to regular ES5 but that's just my opinion.

You also need jQuery (Tested with version 3.1.0+)

"But I don't like TypeScript/SCSS and I'm angry >:("

Well luckily you may have an alternative! I'll list here all the ports I know of, and you may use them if you wish, but I won't promise they'll be as good as this one!

How do I use it?

I'm not sure :(

A lot of the usage you can find from the TypeScript docs included in the sources and main.ts and testprogram.ts or something.

Every part of the JavaScript Terminal is licensed under the MIT-license (see COPYING) excluding a few exceptions:

  • jsx.ts, which is licensed under the GNU GPLv3 License (see COPYING-GPL).
  • main.ts, custom.scss, testprogram.ts, soundtest.ts (all of these are testfiles) and the fabulous music for testing in soundtest.ts, Grip of Nature by Sindwiller which are all licensed under CC-0.
  • JavaScript Terminal also (by default, because of GNU GPLv3 License) includes a copy of jquery v3.1.0 which is also licensed under the MIT license (I think, this is not legal advice). It is suggested that you use a CDN, especially if your terminal will be working over the internet.

This basically means that for the MIT-licensed parts, you can do basically anything, but you need to include the copyright and license with them. For the GPLv3 licensed part (only jsx.ts) you can also do Almost anything, but you need to do few other steps too like keeping the same license with the project where it's used, state what changes have been done, discose source, and include build instructions.
EITHER WAY this isn't legal advice; I'm not a lawyer, I'm a gamedev.