EJSMOD(1)                        User Commands                       EJSMOD(1)



NAME
       ejsmod - Ejscript Module Generator

SYNOPSIS
       ejsmod  [--cslots]  [--empty]  [--html  path] [--listing] [--searchPath
       ejsPath] [--showDebug] [--showNative] [--version] modules ...

DESCRIPTION
       The ejsmod command is a utility program for Ejscript  module  files  to
       generate  symbolic assembler listings, slot binding defintion files and
       HTML documentation for Ejscript modules.

LISTINGS
       To generate symbolic assembler listings, compile your source using  the
       ec  command with the --debug switch. Then invoke "ejsmod --listing mod-
       ules..." where modules is a list of the  relevant  output  modules.  An
       assembler  listing  file  with a ".lst" extension will be generated for
       each corresponding module.

       The listing files interleave disassembled byte code with  the  relevant
       source  code statements. The listing files describe each module and its
       constituent functions and initializers. The bindings for all types  and
       the constant pool are also listed.

DOCUMENTATION
       The  generate HTML documentation for your code, first compile using the
       ec command with the --doc switch. Then invoke "ejsmod --html  dir  mod-
       ules..."  where  dir  is the directory where you want the documentation
       located and modules is a list of the relevant modules.

       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 files which define  symbolic  off-
       sets  for  type  properties and functions. See the Native class samples
       for further information.

BACKGROUND
       Ejscript is an interpreted, object oriented scripting language  and  is
       an  enhanced  implementation  of  the  emerging  ECMAScript  Edition  4
       (Javascript)  language.  Ejscript  supports  statements,   expressions,
       objects,  classes,  exceptions,  namespaces, iterators, type annotation
       and a powerful suite of data types.

       While Javascript is the language of  the  browser,  Ejscript  has  been
       designed  to  run Javascript outside a browser. The goal of Ejscript is
       to create a language ideally suited  for  embedded  applications  where
       efficiency of execution is a paramount concern.

OPTIONS
       --cslots
              Generate slot binding headers for the input modules.

       --empty
              Start  with an empty interpreter without the core language types
              such as Object, Array, Number etc. This option is used to  build
              the foundation Ejscript module ejs.mod which contains the system
              core types.

       --html dir
              Generate HTML documentation  to  the  specified  directory.  The
              source files must have been compiled by ec 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  initiallly  specified  via  the  environment
              variable EJSPATH and may be overridden via the --searchPath ejs-
              Path switch. EJSPATH and the ejsPath command line value are sim-
              ilar  to  the system PATH formats. On windows, path segments are
              separated by ";" and on Linux, Unix, FreeBSD and MAC,  the  path
              segments are separated by ":" delimiters.

       --showDebug
              Show debug instructions in the symbolic assembler listings.

       --showNative
              Show native properties in HTML documentation, assembler listings
              and slot binding files.

       --version
              Print the ejsmod command version and exit.

REPORTING BUGS
       Report bugs to <dev@embedthis.com>.

COPYRIGHT
       Copyright (C) 2004-2009 Embedthis Software.  Ejscript is a trademark of
       Embedthis Software.

SEE ALSO
       ec, ejs, ejsvm



ejsmod                             May 2009                          EJSMOD(1)
