mix compile
A meta task that compiles source files.
It simply runs the compilers registered in your project.
Configuration
-
:compilers- compilers to run, defaults toMix.compilers/0, which are[:yecc, :leex, :erlang, :elixir, :xref, :app]. -
:consolidate_protocols- whentrue, runs protocol consolidation via thecompile.protocolstask. The default value istrue. -
:build_embedded- whentrue, does not generate symlinks in builds. Defaults tofalse. -
:build_path- the directory where build artifacts should be written to. This option is intended only for child apps within a larger umbrella application so that each child app can use the common_builddirectory of the parent umbrella. In a non-umbrella context, configuring this has undesirable side-effects (such as skipping some compiler checks) and should be avoided.
Compilers
To see documentation for each specific compiler, you must invoke help directly for the compiler command:
mix help compile.elixir mix help compile.erlang
You can get a list of all compilers by running:
mix compile --list
Command line options
-
--list- lists all enabled compilers -
--no-archives-check- skips checking of archives -
--no-deps-check- skips checking of dependencies -
--force- forces compilation
Summary
Functions
- compilers()
-
Returns all compilers
- manifests()
-
Returns manifests for all compilers
- run(args)
-
A task needs to implement
runwhich receives a list of command line args
Functions
compilers()
Returns all compilers.
manifests()
Returns manifests for all compilers.
run(args)
run(OptionParser.argv()) :: :ok | :noop
A task needs to implement run which receives a list of command line args.
Callback implementation for Mix.Task.run/1.
© 2012 Plataformatec
Licensed under the Apache License, Version 2.0.
https://hexdocs.pm/mix/1.4.5/Mix.Tasks.Compile.html