xpcshell

From this repo

r.js is made up of a series of modules that are built into one file for
distribution. The dist directory contains the built version of the
code. In the master branch, it should match the current state of the master
code.

If you are doing local modifications from a clone of this repo, you can run
the following command to generate an r.js at the root of this repo:

node dist.js

To generate an r.js that also gets copied to dist with a time stamp, run:

./copydist.js

Running AMD-based projects

If your JS project's main application file is called main.js, then do
the following:

Node

r.js main.js

Requires Node 0.4 or later.

r.js allows using Node modules installed via npm. For more info see the
Use with Node docs.

Java

Nashorn

As of r.js 2.1.16, r.js can run in Nashorn, Java 8+'s JavaScript engine, via the jjs command line tool that is installed with Java.

Then general format of the command:

jjs -scripting path/to/r.js -- [r.js command line arguments here]

Examples:

# Calling r.js to optimize a project using the build config in build.js
jjs -scripting path/to/r.js -- -o build.js
# Calling r.js to run AMD modules, where the main app program is main.js
jjs -scripting path/to/r.js -- main.js

All further examples will use the Node notation, but substitute the r.js references below with the command line structure mentioned above (jjs -scripting path/to/r.js --).