elixir_script v0.26.1 Mix.Tasks.Compile.ElixirScript
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: "src/exjs", output: "dest/js"],
compilers: [:elixir_script] ++ Mix.compilers
]
end
Available options are:
input
: The folder to look for Elixirscript files in. (defaults tolib/elixirscript
)output
: The folder to place generated JavaScript code in. (defaults topriv/elixirscript
)format
: The module format of generated JavaScript code. (defaults to:es
). Choices are::es
- ES Modules:common
- CommonJS:umd
- UMD
The mix compiler will also compile any dependencies that have the elixirscript compiler in its mix compilers as well
Summary
Functions
A task needs to implement run
which receives
a list of command line args.
Callback implementation for Mix.Task.run/1
.