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