MBU: Mix Build Utilities v3.0.0 MBU.BuildTask View Source

BuildTask contains the macros that are used for making the tasks look nicer.

Link to this section Summary

Functions

Sets up the necessary things for a build task

Replacement for Mix.Task’s run/1, used similarly. Code inside will be run when the task is called, with @deps being run first unless deps: false is given in the arguments

Link to this section Functions

Link to this macro __using__(opts \\ []) View Source (macro)

Sets up the necessary things for a build task.

Each build task should have use MBU.BuildTask at its beginning. BuildTask automatically imports Mix.Task and Logger so they don’t need to be added into the task itself.

The following options may be passed to the use clause:

  • :auto_path: Set to true to autogenerate an out_path/0 function for this task. Default: false. Overrides the :auto_paths config.
  • :create_out_path: Set to true to create the output path specified by out_path/0 when the task is started. Default: false. Overrides the :create_out_paths config.
Link to this macro task(args, list) View Source (macro)

Replacement for Mix.Task’s run/1, used similarly. Code inside will be run when the task is called, with @deps being run first unless deps: false is given in the arguments.