Mix, tests and quality
Everything before this part ran as a script. A real project is a Mix project with a layout, dependencies, a configuration, tests and a formatter, and this part builds one step by step.
The tools around the code get the same treatment: ExUnit and doctests run the examples, a typespec documents a contract, the formatter and Credo keep a codebase consistent, and the debugger answers the question a stack trace leaves open.
11.1
Mix projects
mix new, the folder layout, compile, run and test, and the formatter file
Open
11.2
Dependencies
the deps block, mix deps.get, and the package ecosystem described and not run
Open
11.3
Configs
config.exs, runtime.exs, Application.get_env, and the value that moves to the machine
Open
11.4
Testing with ExUnit
a test file, assert, setup, and the report of a failing test
Open
11.5
Doctests
an example in doc, doctest, and the test the documentation writes for you
Open
11.6
Typespecs
spec and type, the contract a spec documents, and the tool that reads it
Open
11.7
mix format
the formatter file, the line length, and the check a pipeline runs
Open
11.8
Credo
the checks, the config file, and the issue a real run reports
Open
11.9
Debugging
IO.inspect, IEx.pry, the debugger, and the trace that answers who called this
Open