SassEx.Importer behaviour (sass_ex v0.1.1) View Source

Definies the behaviour for a custom Sass importer

Link to this section Summary

Callbacks

Convert a filename into a URI

Load a URI from the importer

Link to this section Types

Specs

result_t() :: {:ok, String.t()} | {:error, String.t()}

Link to this section Callbacks

Link to this callback

canonicalize(arg1, arg2)

View Source

Specs

canonicalize(struct() | nil, String.t()) :: result_t() | nil

Convert a filename into a URI

e.g. "example.scss" -> "file:///example.scss"

Specs

load(struct() | nil, String.t()) :: result_t()

Load a URI from the importer

Takes in a URI generated by canonicalize/2 and returns a string representative of the file or an error