elixir_script v0.30.0 ElixirScript.Compiler View Source

The entry point for the ElixirScript compilation process. Takes the given module(s) and compiles them and all modules and functions they use into JavaScript

Link to this section Summary

Functions

Takes either a module name or a list of module names as the entry point(s) of an application/library. From there it will determine which modules and functions are needed to be compiled

Link to this section Functions

Link to this function compile(entry_modules, opts \\ []) View Source
compile(atom | [atom], []) :: nil

Takes either a module name or a list of module names as the entry point(s) of an application/library. From there it will determine which modules and functions are needed to be compiled.

Available options are:

  • output: The path of the generated JavaScript file.

    If output is nil, then generated code is sent to standard out

    If output is a path, the generated code placed in that path. If path ends in .js then that will be the name of the file. If a directory is given, file will be named elixirscript.build.js

  • root: Optional root for imports of FFI JavaScript modules. Defaults to ..