Harness.Pkg behaviour (Harness v0.2.7) 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 symlinks 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()) :: [String.t()]

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