forked from AkkomaGang/akkoma
refactoring
This commit is contained in:
parent
be32d90a0c
commit
38b29779c3
1 changed files with 9 additions and 9 deletions
|
@ -27,16 +27,16 @@ def run(_) do
|
||||||
|
|
||||||
defp do_run(implementation) do
|
defp do_run(implementation) do
|
||||||
start_pleroma()
|
start_pleroma()
|
||||||
{descriptions, _paths} = Mix.Config.eval!("config/description.exs")
|
|
||||||
|
|
||||||
{:ok, file_path} =
|
with {descriptions, _paths} <- Mix.Config.eval!("config/description.exs"),
|
||||||
Pleroma.Docs.Generator.process(
|
{:ok, file_path} <-
|
||||||
implementation,
|
Pleroma.Docs.Generator.process(
|
||||||
descriptions[:pleroma][:config_description]
|
implementation,
|
||||||
)
|
descriptions[:pleroma][:config_description]
|
||||||
|
) do
|
||||||
|
type = if implementation == Pleroma.Docs.Markdown, do: "Markdown", else: "JSON"
|
||||||
|
|
||||||
type = if implementation == Pleroma.Docs.Markdown, do: "Markdown", else: "JSON"
|
Mix.shell().info([:green, "#{type} docs successfully generated to #{file_path}."])
|
||||||
|
end
|
||||||
Mix.shell().info([:green, "#{type} docs successfully generated to #{file_path}."])
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue