-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
88 lines (83 loc) · 2.54 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
defmodule Gameoflife.MixProject do
use Mix.Project
def project do
[
app: :gameoflife,
version: "1.1.0",
elixir: "~> 1.17",
elixirc_paths: elixirc_paths(Mix.env()),
elixirc_options: [warnings_as_errors: true],
compilers: Mix.compilers(),
start_permanent: Mix.env() == :prod,
preferred_envs: [quality: :dev, test: :test],
aliases: aliases(),
deps: deps()
]
end
def application do
[
mod: {Gameoflife.Application, []},
extra_applications: [:os_mon, :logger, :runtime_tools]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
# Web
{:bandit, "~> 1.5"},
{:phoenix, "~> 1.7"},
{:phoenix_html, "~> 4.1"},
{:phoenix_live_view, "~> 1.0.0-rc.1", override: true},
{:phoenix_live_dashboard, "~> 0.8"},
{:phoenix_live_reload, "~> 1.5", only: :dev},
{:esbuild, "~> 0.8", runtime: Mix.env() == :dev},
{:tailwind, "~> 0.2", runtime: Mix.env() == :dev},
{:heroicons,
github: "tailwindlabs/heroicons",
tag: "v2.1.1",
sparse: "optimized",
app: false,
compile: false,
depth: 1},
# Backend
{:dns_cluster, "~> 0.1.1"},
{:libcluster, "~> 3.3"},
{:horde, "~> 0.9"},
{:jason, "~> 1.2"},
{:number, "~> 1.0"},
# Monitoring
{:telemetry, "~> 1.3"},
{:telemetry_metrics, "~> 1.0"},
{:telemetry_poller, "~> 1.1"},
# Developement tools
{:floki, ">= 0.30.0", only: :test},
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:benchee, "~> 1.3", only: [:dev, :test]},
{:ex_doc, "~> 0.34", only: :dev, runtime: false},
{:doctor, "~> 0.21.0"}
]
end
defp aliases do
[
setup: ["deps.get", "assets.setup", "assets.build"],
"assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
"assets.build": ["tailwind gameoflife", "esbuild gameoflife"],
"assets.deploy": [
"tailwind gameoflife --minify",
"esbuild gameoflife --minify",
"phx.digest"
],
quality: ["format --check-formatted", "credo --strict", "dialyzer"],
test: ["test"],
start: ["phx.server"],
docs: ["doctor", "docs"],
commit: [
fn _ -> System.cmd("git", ["add", "."]) end,
fn _ -> System.cmd("git", ["commit", "-m", "wip"]) end,
fn _ -> System.cmd("git", ["push"]) end
]
]
end
end