mix xtra (Extractly v0.5.1) View Source

Mix task to Transform EEx templates in the context of the Extractly module.

This tool serves two purposes.

  1. A simple CLI to basicly EEx.eval_file/2

  2. Access to the Extractly module (available as binding xtra too)

  3. Access to the name of the rendered template with the template binding

The Extractly module gives easy access to Elixir metainformation of the application using the extractly package, notably, module and function documentation.

This is BTW the raison d'être of this package, simple creation of a README.md file with very simple access to the projects hex documentation.

Thusly hexdoc and Github will always be synchronized.

To see that in action just look at the README.md.eex file of this package and compare with what you are reading here.

Example Template:

  Some text
  <%= xtra.functiondoc("M.shiny_function/2") %>
  <%= xtra.moduledoc("String") %>

  More text