Commit 38b29779 authored by Alexander Strizhakov's avatar Alexander Strizhakov

refactoring

parent be32d90a
......@@ -27,16 +27,16 @@ defmodule Mix.Tasks.Pleroma.Docs do
defp do_run(implementation) do
start_pleroma()
{descriptions, _paths} = Mix.Config.eval!("config/description.exs")
{:ok, file_path} =
Pleroma.Docs.Generator.process(
implementation,
descriptions[:pleroma][:config_description]
)
with {descriptions, _paths} <- Mix.Config.eval!("config/description.exs"),
{:ok, file_path} <-
Pleroma.Docs.Generator.process(
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}."])
Mix.shell().info([:green, "#{type} docs successfully generated to #{file_path}."])
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment