-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathmix.exs
89 lines (82 loc) · 2.45 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
defmodule LiveAdmin.MixProject do
use Mix.Project
@version "0.13.0-dev"
def project do
[
app: :live_admin,
name: "LiveAdmin",
description: "A admin UI for Phoenix applications built with LiveView",
version: @version,
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
aliases: aliases(),
package: [
maintainers: ["Thomas Floyd Wright"],
licenses: ["Apache-2.0"],
links: %{"GitHub" => "https://github.com/tfwright/live_admin"},
files: ~w(lib .formatter.exs mix.exs README* dist)
],
source_url: "https://github.com/tfwright/live_admin",
docs: [
main: "readme",
extras: ["README.md"],
source_ref: "v#{@version}"
],
compilers: Mix.compilers() ++ compilers(Mix.env()),
consolidate_protocols: !System.get_env("LIVE_ADMIN_DEV"),
dialyzer: [plt_add_apps: [:docout]]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
mod: {LiveAdmin.Application, []},
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:phoenix_view, "~> 2.0"},
{:phoenix_live_view, ">= 0.20.0 and < 0.21.0"},
{:phoenix_html, "~> 4.0"},
{:phoenix_html_helpers, "~> 1.0"},
{:ecto, "~> 3.12"},
{:ecto_sql, "~> 3.12"},
{:phoenix_ecto, "~> 4.4"},
{:gettext, "~> 0.22"},
{:nimble_options, "~> 1.0"},
{:plug_cowboy, "~> 2.0", only: :dev},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:jason, "~> 1.3", only: [:dev, :test]},
{:ecto_psql_extras, "~> 0.7", only: [:dev, :test]},
{:faker, "~> 0.17", only: :dev},
{:floki, ">= 0.30.0", only: :test},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:docout, github: "tfwright/docout", branch: "main", runtime: false, only: [:dev, :test]},
{:dialyxir, "~> 1.2", only: :dev, runtime: false},
{:mox, "~> 1.0", only: :test}
]
end
defp aliases do
[
dev: ["run --no-halt dev.exs"]
]
end
defp compilers(env) do
if env == :dev && System.get_env("LIVE_ADMIN_DEV") do
[:docout]
else
[]
end
end
defp elixirc_paths(env) do
cond do
env == :dev && System.get_env("LIVE_ADMIN_DEV") -> ["lib", "dev"]
env == :test -> ["lib", "test"]
true -> ["lib"]
end
end
end