Command Line
On the command line, you can invoke the compiler by calling either
bin/jooc ...
in Unix or
bin\jooc.bat ...
in Windows. The command name is followed by command line options and then by a list of files to be compiled.
Possible options are:
| -d DIR | output directory where to put generated JavaScript code |
| -g MODE | generate debuggable output; possible modes are source, lines, none |
| -api DIR | destination directory where to generate ActionScript API stubs |
| -sourcepath PATH | a list of directories which are root directories of Jangaroo sources, separated by the platform specific path separator character (e.g. ';' on Windows, ':' on MacOS and Linux) |
| -classpath PATH | a list of directories or module artifacts (jars) which contain API stubs or the full sources of Jangaroo modules on which the given sources depend on, separated by the platform specific path separator character (e.g. ';' on Windows, ':' on MacOS and Linux) |
| -ea | enable assertions: generate runtime checks for assert statements |
| -help | print a help message |
| -v | print verbose log messages about the compilation |
| -version | print the Jangaro compiler version |
If no output directory is specified, output files are written to the directory in which the corresponding input files are placed.
If no -g option is specified for generating debug output, use the mode lines. If the option -g is specified without a mode, use the mode source. Mode source generates output that includes all comments, preserves line breaks and white space, and generates readable names for anonymous inner functions. Mode lines only preserves line breaks and white space. Mode none shortens the generated output as far as possible without renaming variables and functions.
An example invocation of the compiler might look like this:
bin/jooc -g none -d htdocs mypackage/MyClass.as