elixir_script v0.32.1 mix compile.elixir_script View Source
Mix compiler to allow mix to compile Elixirscript source files into JavaScript
Looks for an elixir_script or elixirscript key in your mix project config
def project do
[
app: :my_app,
version: "0.1.0",
elixir: "~> 1.0",
deps: deps,
elixir_script: [ input: Example, output: "dest/js"],
compilers: Mix.compilers ++ [:elixir_script]
]
end
Available options are:
input: The module or modules that are the entry to your application (required)output: The path of the generated JavaScript file. (defaults topriv/elixir_script/build)If path ends in
.jsthen that will be the name of the file. If a directory is given, file will be namedelixirscript.build.jsroot: Optional root for imports of FFI JavaScript modules. Defaults to.. If using output directly in a browser, you may want to make it something like/jsor some uri.
The mix compiler will also compile any dependencies that have the elixirscript compiler in its mix compilers as well
Link to this section Summary
Functions
Removes build artifacts and manifests
Lists manifest files for the compiler
Receives command-line arguments and performs compilation. If it produces errors, warnings, or any other diagnostic information, it should return a tuple with the status and a list of diagnostics
Link to this section Functions
Removes build artifacts and manifests.
Callback implementation for Mix.Task.Compiler.clean/0.
Lists manifest files for the compiler.
Callback implementation for Mix.Task.Compiler.manifests/0.
run([binary()]) ::
:ok |
:noop |
{:ok | :noop | :error, [Mix.Task.Compiler.Diagnostic.t()]}
Receives command-line arguments and performs compilation. If it produces errors, warnings, or any other diagnostic information, it should return a tuple with the status and a list of diagnostics.
Callback implementation for Mix.Task.Compiler.run/1.