diff --git a/lib/ash/doc_index.ex b/lib/ash/doc_index/ash_doc_index.ex similarity index 73% rename from lib/ash/doc_index.ex rename to lib/ash/doc_index/ash_doc_index.ex index d8841141..cf49b58a 100644 --- a/lib/ash/doc_index.ex +++ b/lib/ash/doc_index/ash_doc_index.ex @@ -1,19 +1,13 @@ -defmodule Ash.DocIndex do - @moduledoc "A module for configuring how a library is rendered in ash_hq" - @type extension :: %{ - optional(:module) => module, - optional(:target) => String.t(), - optional(:default_for_target?) => boolean, - optional(:name) => String.t(), - optional(:type) => String.t() - } - - @callback extensions() :: list(extension()) - - @behaviour __MODULE__ +defmodule Ash.DocIndex.AshDocIndex do + @moduledoc "Doc index for Ash" + @behaviour Ash.DocIndex @impl true - @spec extensions() :: list(extension) + @spec for_library() :: String.t() + def for_library, do: "ash" + + @impl true + @spec extensions() :: list(Ash.DocIndex.extension()) def extensions do [ %{ diff --git a/lib/ash/doc_index/doc_index.ex b/lib/ash/doc_index/doc_index.ex new file mode 100644 index 00000000..12300fba --- /dev/null +++ b/lib/ash/doc_index/doc_index.ex @@ -0,0 +1,13 @@ +defmodule Ash.DocIndex do + @moduledoc "A module for configuring how a library is rendered in ash_hq" + @type extension :: %{ + optional(:module) => module, + optional(:target) => String.t(), + optional(:default_for_target?) => boolean, + optional(:name) => String.t(), + optional(:type) => String.t() + } + + @callback extensions() :: list(extension()) + @callback for_library() :: String.t() +end