Documentation updates for stable release (#73)
[akkoma] / lib / mix / tasks / pleroma / frontend.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Mix.Tasks.Pleroma.Frontend do
6 use Mix.Task
7
8 import Mix.Pleroma
9
10 @shortdoc "Manages bundled Pleroma frontends"
11
12 @moduledoc File.read!("docs/docs/administration/CLI_tasks/frontend.md")
13
14 def run(["install", "none" | _args]) do
15 shell_info("Skipping frontend installation because none was requested")
16 "none"
17 end
18
19 def run(["install", frontend | args]) do
20 start_pleroma()
21
22 {options, [], []} =
23 OptionParser.parse(
24 args,
25 strict: [
26 ref: :string,
27 static_dir: :string,
28 build_url: :string,
29 build_dir: :string,
30 file: :string
31 ]
32 )
33
34 Pleroma.Frontend.install(frontend, options)
35 end
36 end