Building JS/CC for Your Platform

JS/CC is platform-independent software. The default build process creates runners for browser platforms (using PhantomJS for running as a script), Node.JS, Mozilla/Rhino, and Nashorn. JS/CC can be built on Windows, Linux, or other *nix platforms that support Node.js and Java 8.

Download Source Code

To get the source code, use git:

                  
                      git clone https://github.com/abrobston/jscc.git
                  
              

Install Prerequisites

Node.js and npm

Ensure that you have Node.js and npm. See https://docs.npmjs.com/getting-started/installing-node for details. Building and testing JS/CC most recently used Node versions 4.4.3 and 5.10.1, but other versions will likely work also.

Gulp

Ensure that you have Gulp version 3.x. See https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md. Gulp version 4.x may work but has not been tested.

Java 8

The build process uses Java even if you are not using any of the Java-based runners.

Ensure that Java 8 or later is installed and that the JAVA_HOME environment variable points to the correct path of this installation. Builds and tests have been done with Oracle's distribution of Java 8. OpenJDK 8 may work but has not been tested.

Build

Get Dependencies from NPM

From the root project directory, run:

                  
                      npm update
                  
              

Execute Gulp Task

To run the default build target, simply run:

                  
                      gulp
                  
              

The default build target downloads some additional dependencies, generates API documentation, and builds for the four platforms currently supported. To run tests, build first, then run:

                  
                      gulp test
                  
              

For other targets, see gulpfile.js.