The SLIME project provides tools for JavaScript development on several platforms:
- Writing Java-enabled JavaScript scripts via the
jshscripting environment - Writing JavaScript servlets for Java servlet containers (Tomcat, Jetty, etc.)
- Writing front-end code: Chrome, Firefox, Safari
- (requires repair)
Using JXA, the macOS JavaScript automation framework
The Java-based environments support Mozilla Rhino and OpenJDK Nashorn, including standalone Nashorn for JDK 15 and up. GraalJS support is under development.
The following script runs the master version of the shell remotely and runs the remotely-hosted
jrunscript/jsh/test/jsh-data.jsh.js script which emits information about the executed shell:
curl -v -L https://raw.githubusercontent.com/davidpcaldwell/slime/main/jsh | bash -s https://raw.githubusercontent.com/davidpcaldwell/slime/main/jrunscript/jsh/test/jsh-data.jsh.jswget https://raw.githubusercontent.com/davidpcaldwell/slime/master/jsh -O - | bash -s https://raw.githubusercontent.com/davidpcaldwell/slime/master/jrunscript/jsh/test/jsh-data.jsh.jsgit clone https://github.com/davidpcaldwell/slime.git; cd slime./jsh jrunscript/jsh/test/jsh-data.jsh.js- runs a sample program emitting information about the installedjshshell; will bootstrap Java if needed, install a JVM JavaScript engine if needed, and then run thejshshell using the Java and engine it obtained (or found)../fifty view- runs a server that serves the SLIME documentation and opens an instance of Google Chrome to browse it.
To be able to work with SLIME locally, you'll want to get the code. SLIME is a scripting platform, and so it is written with the philosophy that essentially nothing should be prebuilt; it runs from its own source code. You can clone the source code from GitHub or download it and unzip it.
At that point, it is ready to use; SLIME is capable of installing its own dependencies (including Java, Node.js, and TypeScript) over the internet.
The top-level jsh script can be used to run scripts. jsh scripts that are top-level scripts and intended to
be used as main programs are denoted by the suffix .jsh.js. The example jsh-data.jsh.js invocation above will run a script that
will output a JSON data structure describing the shell.
The documentation server can be run with the ./fifty view command, which will start a server and Google Chrome browser for
displaying SLIME documentation locally.