ElixirScript

Transpiles Elixir into JavaScript.

All transpile 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 transpile 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
Source

Summary

copy_standard_libs_to_destination(destination)

Copies the javascript that makes up the ElixirScript standard libs to the specified location in a “/__lib” folder

transpile(elixir_code, opts \\ [])

Transpiles the given Elixir code string

transpile_path(path, opts \\ [])

Transpiles the elixir files found at the given path

transpile_quoted(quoted, opts \\ [])

Transpiles the given Elixir code in quoted form

Functions

copy_standard_libs_to_destination(destination)

Copies the javascript that makes up the ElixirScript standard libs to the specified location in a “/__lib” folder

Source
transpile(elixir_code, opts \\ [])

Specs:

  • transpile(binary, Dict.t) :: [binary | {binary, binary}]

Transpiles the given Elixir code string

Source
transpile_path(path, opts \\ [])

Specs:

  • transpile_path(binary, Dict.t) :: [binary | {binary, binary}]

Transpiles the elixir files found at the given path

Source
transpile_quoted(quoted, opts \\ [])

Specs:

  • transpile_quoted(Macro.t, Dict.t) :: [binary | {binary, binary}]

Transpiles the given Elixir code in quoted form

Source