BpollackElixirTemplate (bpollack_elixir_template v0.1.0)

BpollackElixirTemplate

Basic template for me to use for my elixir projects. It sets up a few things:

  • Extra applications in :dev mode (runtime tools for dbg/trace, observer)
  • Developer tooling (credo, dialyzer through dialyxer, exsync to sync repl, recon for debugging, ex_doc for easy doc gen)
  • Simple tasks to build and type check etc
    • build - type check, compile, and run credo (with failures allowed)
    • test - build (above) and test
    • stddocs - open stdlib docs (offline)
    • docs - open docs for local files in browser (offline) ala cargo doc --open

Installation

Setup MixTemplates and install this template

mix archive.install hex mix_templates
mix archive.install hex mix_generator
mix template.install hex bpollack_elixir_template

Usage

mix gen bpollack_elixir_template [DIR]

Summary

Functions

Return the name or path of a template that this template is based upon. That template will be processed first, and then this one will be executed.

Override this function to do any cleanup after your template has been copied into the user project. One use of this is to remove unwanted files created by a template upon which this template is based.

Return a map where the keys are filename extensions and the keys are either the :all atom or a list of allowed files with that extension.

Return the name of this template as an atom. This is the name passed to the gen command.

Return the list of options supported by this template.

Return the short description of this template, or nil.

Return the absolute path to the tree that is to be copied when instantiating this template. This top-level dir will typically just contain a directory called $APP_NAME$.

Functions

Return the name or path of a template that this template is based upon. That template will be processed first, and then this one will be executed.

Link to this function

clean_up(assigns)

Override this function to do any cleanup after your template has been copied into the user project. One use of this is to remove unwanted files created by a template upon which this template is based.

Return a map where the keys are filename extensions and the keys are either the :all atom or a list of allowed files with that extension.

Return the name of this template as an atom. This is the name passed to the gen command.

Return the list of options supported by this template.

Return the short description of this template, or nil.

Return the absolute path to the tree that is to be copied when instantiating this template. This top-level dir will typically just contain a directory called $APP_NAME$.