View Source Igniter.Extension behaviour (igniter v0.5.2)

Alter igniter's behavior by adding new functionality.

This is used to allow frameworks to modify things like the conventional location of files.

Summary

Callbacks

Choose a proper location for any given module.

Callbacks

proper_location(t, module, t)

@callback proper_location(
  Igniter.t(),
  module(),
  Keyword.t()
) :: {:ok, Path.t()} | :error

Choose a proper location for any given module.

Possible return values:

  • {:ok, path}: The path where the module should be located.
  • :error: It should go in the default place, or according to other extensions.
  • :keep: Keep the module in the same location, unless another extension has a place for it, or its just been created.