EJSMOD(1) User Commands EJSMOD(1) NAME ejsmod - Ejscript Module Generator SYNOPSIS ejsmod [--cslots] [--empty] [--html path] [--listing] [--searchPath ejsPath] [--showBuiltin] [--showDebug] [--version] modules ... DESCRIPTION The ejsmod command is a utility program for Ejscript module files to generate symbolic assembler listings, slot defintion files for native classes and HTML documentation. LISTINGS To generate symbolic assembler listings, compile your source using the ejsc command with the --debug switch. Then invoke ejsmod with the --listing switch and supply the required modules. An assembler listing file with a ".lst" extension will be generated for each corresponding logical module directive. The listing files interleave disassembled byte code with the relevant source code statements. The listings describe each module and its con- stituent functions and initializers. The bindings for all types and the constant pool are also listed. DOCUMENTATION To generate HTML documentation for your code, first compile using the ejsc command with the --doc switch. Then invoke ejsmod and use the --html switch with the directory where you want the documentation gen- erated. The HTML documentation will include all modules, namespaces, types, functions, properties and variable declarations. BINDING SLOT FILES Ejscript supports the creation of native types which are coded in the C language. Native types are useful for core system types and for classes that must run at near binary speed. To facilitate creating native types, ejsmod generates slot binding definition headers which define symbolic offsets for declarations. See the Native class samples for further information. OPTIONS --cslots Generate slot binding definition headers for the input modules. --empty Start with an empty interpreter without the core language types such as Object, Array and Number. This option is used to build the foundation ejs.mod module which contains the core system types. --html dir Generate HTML documentation to the specified directory. The source files must have been compiled by ejsc with the --doc switch to include the documentation strings in the module files. --listing Generate symbolic assembler files for each input module. --searchPath ejsPath Override the module search path. The module search path is a set of directories that the ejsmod command will use when locating and loading Ejscript modules. Given a module named "a.b.c" in a script, ejsmod will use the following 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" 3. Search for a module file named "a.b.c.mod" in EJSPATH 4. Search for a module file named c.mod in EJSPATH The search path is initially specified via the environment vari- able EJSPATH and may be overridden via the --searchPath ejsPath switch. EJSPATH and the ejsPath command line value are similar to the system PATH formats. On windows, path segments are sepa- rated by ";" and on Linux, Unix, FreeBSD and MAC, the path seg- ments are separated by ":" delimiters. --showDebug Show debug instructions in the symbolic assembler listings. --showBuiltin Show built-in properties in HTML documentation, assembler list- ings and slot binding files. --version Print the ejsmod command version and exit. BACKGROUND Ejscript is an enhanced implementation of the JavaScript language for use in embedded applications such as web servers, embedded devices and mobile phones. It is especially well suited for Server-Side JavaScript web applications. Ejscript is a dynamic, interpreted, object-oriented scripting language that supports classes, objects, exceptions, statements, expressions and a powerful suite of data types. REPORTING BUGS Report bugs to dev@embedthis.com. COPYRIGHT Copyright (C) 2004-2009 Embedthis Software. Ejscript is a trademark of Embedthis Software. SEE ALSO ejsc, ejsgen, ejs, ejsvm ejsmod March 2009 EJSMOD(1)