mix xtra (Extractly v0.5.3) View Source
Mix task to Transform EEx templates in the context of the Extractly module.
This tool serves two purposes.
A simple CLI to basicly
EEx.eval_file/2Access to the
Extractlymodule (available as bindingxtratoo)Access to the name of the rendered template with the
templatebinding
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") %>
<%= xtra.moduledoc("MyModule", include: :all) %>
<%= xtra.toc "SomeFile.md" %>
More text A special case is the occurrence of <%= xtra.toc :self, ... %> which just inserts a
placeholder which than is replaced by the TOC of the generated output in a second pass