elixir_script v0.17.0 ElixirScript
Translates Elixir into JavaScript.
All compile functions return a list of transpiled javascript code or a tuple consisting of the file name for the code and the transpiled javascript code.
All compile functions also take an optional opts parameter that controls transpiler output.
Available options are:
:include_path
- a boolean controlling whether to return just the JavaScript code or a tuple of the file name and the JavaScript code:root
- a binary path prepended to the path of the standard lib imports if needed:env
- a Macro.env struct to use. This is most useful when using macros. Make sure that the env has the macros imported or required.:core_path
- The es6 import path used to import the elixirscript core. When using this option, the Elixir.js file is not exported:full_build
- For compile_path, tells the compiler to perform a full build instead of incremental one:output
- option to tell compiler how to output datanil
: Return as list:stdout
: Write to standard outpath (string)
: Write to specified path
Summary
Functions
Compiles the given Elixir code string
Compiles the elixir files found at the given path
Compiles the given Elixir code in quoted form
Copies the javascript that makes up the ElixirScript stdlib to the specified location
Functions
Specs
compile(binary, Map.t) :: [binary | {binary, binary} | :ok]
Compiles the given Elixir code string
Specs
compile_path(binary, Map.t) :: [binary | {binary, binary} | :ok]
Compiles the elixir files found at the given path
Compiles the given Elixir code in quoted form