--require 'module ...'
The ejsc command compiles Ejscript programs to produce Ejscript module
files containing byte code. The module files may then be run via the
ejs shell command.
The ejsc command is both a compiler and link editor. Inputs can be
either Ejscript source files or Ejscript modules that have come from
previous invocations of the ejsc command. Outputs will be one or more
Ejscript module files that contain declarations and byte code.
An output module file will be created for each Ejscript module direc-
tive encountered during compilation. A module file will also be created
for any global variables or functions declared outside a module direc-
tive. These global declarations will go into the default module that is
specially reserved for global declarations. Each module file will be
named according to the module directive name, but with a .mod extension
If ejsc is invoked with the --out switch, all input scripts, modules
and any other dependent modules are merged together into a single out-
put module. The modules retain their logical naming, but are emitted in
a single output module file. When that module file is loaded, all the
contained modules will be available to the program. This creates not
only a convenient way to package an entire application as a single
file, it also permits many optimizations by merging the entire applica-
tion and its dependent modules into a single module.
The ejsc compiler will attempt to early-bind all possible variable and
function references. Binding means resolving references to the underly-
ing storage for properties and functions. Doing this at compile time
usually results in much faster execution at run-time.
When using the --out switch, the compiler can early-bind all global
--bind Bind global variable declarations into slot references. This
results in faster more compact code. However, only one module
can have its global variables bound.
Generate symbolic debug instructions. This permits symbolic
debugging of Ejscript programs and enables exception stack back-
traces to include line number information.
--doc Include documentation strings from input scripts in the output
modules. The ejsmod command can then generate HTML documentation
using these doc strings. The format of the doc strings resembles
that of Javadoc.
Merge all input files and modules together into a single output
module. This option acts like a link-editor combining all inputs
together. Useful if you want to distribute your application as a
single module file.
Set the code optimization level. Level values must be between 0
(least) and 9 (most). Default is 9.
Just parse the source scripts. Don't verify, execute or generate
output. Useful to check the script syntax only.
--require 'module ...'
List of modules to preload before compiling input files.
Set the module search path. The module search path is a set of
directories that the ejsc command will use when locating and
loading Ejscript modules. The search path will always have some
system directories appended to the end. These include paths
specified via the EJSPATH environment variable and key system
directories such as the Ejscript system module directory and the
directory containing the ejsc command.
The search path value is similar in format to the system PATH
variable format. On windows, path segments are separated by ";"
and on Linux, Unix, FreeBSD and MAC, the path segments are sepa-
rated by ":" delimiters.
Given a module named "a.b.c" in a script, ejsc will use the fol-
lowing search strategy to locate the module:
1. Search for a module file named "a.b.c.mod"
2. Search for a module file named "a/b/c.mod"
Print the ejsc command version and exit.
Set the compiler warning verbosity level. Level values must be
between 0 (least verbose) and 9 (most). Default is 0.
use in embedded applications such as web servers, embedded and mobile
Ejscript is a dynamic, interpreted, object-oriented scripting language
that supports classes, objects, exceptions, statements, expressions and
a powerful suite of data types.
Report bugs to firstname.lastname@example.org.
Copyright (C) Embedthis Software. Ejscript is a trademark of Embedthis
ejsc March 2014 EC(1)
Man(1) output converted with