77 lines
2.4 kB
1
defmodule Blog.MixProject do
2
use Mix.Project
3
4
def project do
5
[
6
app: :blog,
7
version: "0.1.0",
8
elixir: "~> 1.14",
9
elixirc_paths: elixirc_paths(Mix.env()),
10
start_permanent: Mix.env() == :prod,
11
aliases: aliases(),
12
deps: deps(),
13
compile_options: [:debug_info]
14
]
15
end
16
17
# Configuration for the OTP application.
18
#
19
# Type `mix help compile.app` for more information.
20
def application do
21
[
22
mod: {Blog.Application, []},
23
extra_applications: [:logger, :runtime_tools]
24
]
25
end
26
27
# Specifies which paths to compile per environment.
28
defp elixirc_paths(:test), do: ["lib", "test/support"]
29
defp elixirc_paths(_), do: ["lib"]
30
31
# Specifies your project dependencies.
32
#
33
# Type `mix help deps` for examples and options.
34
defp deps do
35
[
36
{:phoenix, "~> 1.7.10"},
37
{:phoenix_html, "~> 4.1"},
38
{:phoenix_live_reload, "~> 1.2", only: :dev},
39
{:phoenix_live_view, "~> 1.0.0"},
40
{:phoenix_pubsub, "~> 2.0"},
41
{:floki, ">= 0.30.0", only: :test},
42
{:req, "~> 0.5.0"},
43
{:phoenix_live_dashboard, "~> 0.8.3"},
44
{:esbuild, "~> 0.8", runtime: Mix.env() == :dev},
45
{:tailwind, "~> 0.2", runtime: Mix.env() == :dev},
46
{:swoosh, "~> 1.5"},
47
{:finch, "~> 0.13"},
48
{:telemetry_metrics, "~> 1.0"},
49
{:telemetry_poller, "~> 1.0"},
50
{:gettext, "~> 0.26"},
51
{:jason, "~> 1.2"},
52
{:bandit, "~> 1.5"},
53
{:earmark, "~> 1.4"},
54
{:websockex, "~> 0.4.3"},
55
{:ecto_sql, "~> 3.10"},
56
{:postgrex, ">= 0.0.0"}
57
]
58
end
59
60
# Aliases are shortcuts or tasks specific to the current project.
61
# For example, to install project dependencies and perform other setup tasks, run:
62
#
63
# $ mix setup
64
#
65
# See the documentation for `Mix` for more info on aliases.
66
defp aliases do
67
[
68
setup: ["deps.get", "ecto.setup", "assets.setup", "assets.build"],
69
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
70
"ecto.reset": ["ecto.drop", "ecto.setup"],
71
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
72
"assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
73
"assets.build": ["tailwind blog", "esbuild blog"],
74
"assets.deploy": ["tailwind blog --minify", "esbuild blog --minify", "phx.digest"]
75
]
76
end
77
end
78