aboutsummaryrefslogtreecommitdiff
path: root/lib/mix/tasks/pleroma/frontend.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mix/tasks/pleroma/frontend.ex')
-rw-r--r--lib/mix/tasks/pleroma/frontend.ex14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/mix/tasks/pleroma/frontend.ex b/lib/mix/tasks/pleroma/frontend.ex
index 8334e0049..9b151c3bd 100644
--- a/lib/mix/tasks/pleroma/frontend.ex
+++ b/lib/mix/tasks/pleroma/frontend.ex
@@ -7,6 +7,8 @@ defmodule Mix.Tasks.Pleroma.Frontend do
import Mix.Pleroma
+ alias Pleroma.Frontend
+
@shortdoc "Manages bundled Pleroma frontends"
@moduledoc File.read!("docs/administration/CLI_tasks/frontend.md")
@@ -16,7 +18,7 @@ defmodule Mix.Tasks.Pleroma.Frontend do
"none"
end
- def run(["install", frontend | args]) do
+ def run(["install", name | args]) do
start_pleroma()
{options, [], []} =
@@ -24,13 +26,19 @@ defmodule Mix.Tasks.Pleroma.Frontend do
args,
strict: [
ref: :string,
- static_dir: :string,
build_url: :string,
build_dir: :string,
file: :string
]
)
- Pleroma.Frontend.install(frontend, options)
+ options
+ |> Keyword.put(:name, name)
+ |> opts_to_frontend()
+ |> Frontend.install()
+ end
+
+ defp opts_to_frontend(opts) do
+ struct(Frontend, opts)
end
end