Harness.Pkg behaviour (Harness v0.7.1) View Source

A behaviour for defining harness package modules.

Harness packages should add a pkg.exs to their root directory which describes a single module which implements this behaviour.

Link to this section Summary

Types

t()

A package module's struct

Callbacks

A function to transform incoming opts (in keyword format) into a package's struct (t/0).

A list of links to create from the .harness directory to project root.

Link to this section Types

Specs

t() :: struct()

A package module's struct

Link to this section Functions

Link to this section Callbacks

Specs

cast(opts :: Keyword.t()) :: t()

A function to transform incoming opts (in keyword format) into a package's struct (t/0).

The simplest cast/1 is like so:

def cast(opts), do: struct(__MODULE__, opts)

Specs

links(t()) :: [Path.t() | {Path.t(), :sym | :hard}]

A list of links to create from the .harness directory to project root.

The link can be a string path which will be created as a symlink or the link can be a tuple with the path and an atom declaring the type of link as :sym or :hard.