ash_authentication_phoenix/mix.exs

158 lines
4.8 KiB
Elixir
Raw Permalink Normal View History

defmodule AshAuthentication.Phoenix.MixProject do
@moduledoc false
2022-10-25 10:39:57 +13:00
use Mix.Project
2024-09-04 02:17:30 +12:00
@version "2.1.1"
2022-10-25 11:23:05 +13:00
2022-10-25 10:39:57 +13:00
def project do
[
app: :ash_authentication_phoenix,
2022-10-25 11:23:05 +13:00
version: @version,
description: "Phoenix integration for Ash Authentication",
elixir: "~> 1.16",
2022-10-25 10:39:57 +13:00
start_permanent: Mix.env() == :prod,
2022-10-25 11:23:05 +13:00
preferred_cli_env: [ci: :test],
aliases: aliases(),
deps: deps(),
package: package(),
elixirc_paths: elixirc_paths(Mix.env()),
dialyzer: [
plt_add_apps: [:mix, :ex_unit, :ash_authentication],
2022-10-25 11:23:05 +13:00
plt_core_path: "priv/plts",
plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
],
docs: [
main: "readme",
extras: [
"README.md",
"documentation/tutorials/get-started.md",
2024-05-13 16:25:57 +12:00
"documentation/tutorials/liveview.md",
"documentation/tutorials/ui-overrides.md"
],
groups_for_extras: [
Tutorials: ~r'documentation/tutorials',
"How To": ~r'documentation/how_to',
Topics: ~r'documentation/topics',
DSLs: ~r'documentation/dsls'
],
formatters: ["html"],
2023-10-03 01:41:23 +13:00
before_closing_head_tag: fn type ->
if type == :html do
"""
2023-10-03 04:05:31 +13:00
<script>
if (location.hostname === "hexdocs.pm") {
var script = document.createElement("script");
script.src = "https://plausible.io/js/script.js";
script.setAttribute("defer", "defer")
script.setAttribute("data-domain", "ashhexdocs")
document.head.appendChild(script);
}
</script>
2023-10-03 01:41:23 +13:00
"""
end
end,
filter_modules: ~r/^Elixir.AshAuthentication.Phoenix/,
source_url_pattern:
"https://github.com/team-alembic/ash_authentication_phoenix/blob/main/%{path}#L%{line}",
groups_for_modules: [
2022-10-26 20:21:10 +13:00
Welcome: [
AshAuthentication.Phoenix
],
"Routing and Controller": [
AshAuthentication.Phoenix.Controller,
AshAuthentication.Phoenix.Plug,
AshAuthentication.Phoenix.Router,
AshAuthentication.Phoenix.LiveSession
],
Customisation: [
~r/^AshAuthentication\.Phoenix\..+Live/,
~r/^AshAuthentication\.Phoenix\.Overrides/,
~r/^AshAuthentication\.Phoenix\.Components/
2022-10-26 20:21:10 +13:00
],
Utilities: [
AshAuthentication.Phoenix.Utils.Flash
]
]
2022-10-25 11:23:05 +13:00
]
]
end
def package do
[
maintainers: [
"James Harton <james.harton@alembic.com.au>",
"Zach Daniel <zach@zachdaniel.dev>"
2022-10-25 11:23:05 +13:00
],
licenses: ["MIT"],
links: %{
"Source" => "https://github.com/team-alembic/ash_authentication_phoenix"
},
source_url: "https://github.com/team-alembic/ash_authentication_phoenix",
files: ~w[lib .formatter.exs mix.exs README* LICENSE* CHANGELOG* documentation]
2022-10-25 10:39:57 +13:00
]
end
# Run "mix help compile.app" to learn about applications.
2022-10-25 11:23:05 +13:00
def application, do: application(Mix.env())
def application(:dev) do
2022-10-25 10:39:57 +13:00
[
extra_applications: [:logger],
2022-10-25 11:23:05 +13:00
mod: {Dev.Application, []}
2022-10-25 10:39:57 +13:00
]
end
2022-10-25 11:23:05 +13:00
def application(_),
do: [
extra_applications: [:logger]
]
2022-10-25 10:39:57 +13:00
# Run "mix help deps" to learn about dependencies.
defp deps do
[
2024-05-11 10:28:25 +12:00
{:ash_authentication, "~> 4.0"},
{:ash_phoenix, "~> 2.0"},
{:ash, "~> 3.0"},
2022-10-25 11:23:05 +13:00
{:jason, "~> 1.0"},
{:phoenix_html, "~> 4.0"},
{:phoenix_html_helpers, "~> 1.0"},
2022-10-25 11:23:05 +13:00
{:phoenix_live_view, "~> 0.18"},
{:phoenix_view, "~> 2.0"},
2022-10-25 11:23:05 +13:00
{:phoenix, "~> 1.6"},
{:bcrypt_elixir, "~> 3.0"},
{:slugify, "~> 1.3"},
2022-10-25 11:23:05 +13:00
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.2", only: [:dev, :test], runtime: false},
{:doctor, "~> 0.18", only: [:dev, :test]},
{:ex_check, "~> 0.15", only: [:dev, :test]},
{:ex_doc, github: "elixir-lang/ex_doc", only: [:dev, :test], runtime: false},
{:faker, "~> 0.17", only: [:dev, :test]},
2022-10-25 11:23:05 +13:00
{:git_ops, "~> 2.4", only: [:dev, :test], runtime: false},
{:makeup_html, ">= 0.0.0", only: :dev, runtime: false},
2022-10-25 11:23:05 +13:00
{:mimic, "~> 1.7", only: [:dev, :test]},
{:mix_audit, "~> 2.1", only: [:dev, :test]},
{:plug_cowboy, "~> 2.5", only: [:dev, :test]},
{:sobelow, "~> 0.13", only: [:dev, :test]},
{:floki, ">= 0.30.0", only: :test}
2022-10-25 11:23:05 +13:00
]
end
defp aliases do
[
ci: [
"format --check-formatted",
"doctor --full --raise",
"credo --strict",
"dialyzer",
"hex.audit",
"test"
2023-02-24 16:13:33 +13:00
],
docs: ["docs", "spark.replace_doc_links"]
2022-10-25 10:39:57 +13:00
]
end
2022-10-25 11:23:05 +13:00
defp elixirc_paths(:test), do: ["lib", "test/support", "dev"]
defp elixirc_paths(:dev), do: ["lib", "test/support", "dev"]
defp elixirc_paths(_), do: ["lib"]
2022-10-25 10:39:57 +13:00
end