2020-07-30 06:12:41 -06:00
|
|
|
# Pleroma: A lightweight social networking server
|
2021-01-12 23:49:20 -07:00
|
|
|
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
2020-07-30 06:12:41 -06:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
defmodule Mix.Tasks.Pleroma.Frontend do
|
|
|
|
use Mix.Task
|
|
|
|
|
|
|
|
import Mix.Pleroma
|
|
|
|
|
|
|
|
@shortdoc "Manages bundled Pleroma frontends"
|
|
|
|
|
2022-07-15 06:27:16 -06:00
|
|
|
@moduledoc File.read!("docs/docs/administration/CLI_tasks/frontend.md")
|
2020-07-30 06:12:41 -06:00
|
|
|
|
|
|
|
def run(["install", "none" | _args]) do
|
|
|
|
shell_info("Skipping frontend installation because none was requested")
|
|
|
|
"none"
|
|
|
|
end
|
|
|
|
|
|
|
|
def run(["install", frontend | args]) do
|
|
|
|
start_pleroma()
|
|
|
|
|
|
|
|
{options, [], []} =
|
|
|
|
OptionParser.parse(
|
|
|
|
args,
|
|
|
|
strict: [
|
|
|
|
ref: :string,
|
|
|
|
static_dir: :string,
|
2020-07-31 09:58:50 -06:00
|
|
|
build_url: :string,
|
|
|
|
build_dir: :string,
|
|
|
|
file: :string
|
2020-07-30 06:12:41 -06:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
2020-10-27 09:20:04 -06:00
|
|
|
Pleroma.Frontend.install(frontend, options)
|
2020-07-30 06:12:41 -06:00
|
|
|
end
|
|
|
|
end
|