Docs›Languages
Elixir
In one sentence
ElixirBuild builds your Elixir with the Erlang and Elixir your group pins, tests it with ExUnit, and releases a program with its own Erlang.
Build system
ElixirBuildStart one
plinto create elixir-service HelloEx (or elixir-lib)Ships asa Mix release in an archive
The project
Name the project as Elixir names a module: HelloEx, not hello-ex. Code is in src/ and tests in tst/, with a tst/test_helper.exs. plinto writes mix.exs for the build.
plinto.conf
{
name = HelloEx
version = 1.0
build = ElixirBuild
build-dependencies: {
ElixirBuild = 1.0
Erlang = 29
Elixir = 1.20
}
}
A program
A project that names its application's module, main = HelloEx.Application, defined in src/application.ex, is a program: plinto run runs it with mix run --no-halt, with the arguments args = [--port, 8080] names first, and a release makes a release of it.
Settings
In configuration/ElixirBuild.config:
| Key | What it does |
|---|---|
warnings-as-errors |
fail on a compiler warning (default true) |
application |
a library's own application module, which starts with the program using it |
extra-applications |
applications to start too (default [logger]) |
release |
false for a library that has src/application.ex |
run.erl-options |
what plinto run passes to Erlang |
Libraries
$ plinto import hex jason==1.4.4
A group holds one version of each Hex package. Elixir projects don't build on Windows yet.