-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
169 lines (153 loc) · 4.55 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
defmodule ObserverWeb.MixProject do
use Mix.Project
@source_url "https://github.com/thiagoesteves/observer_web"
@version "0.1.8"
def project do
[
app: :observer_web,
version: @version,
name: "Observer Web",
description: "Observer Web Dashboard for OTP management and performance metrics",
docs: docs(),
extra_section: "GUIDES",
extras: extras(),
elixir: "~> 1.15",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
package: package(),
docs: docs(),
deps: deps(),
test_coverage: [tool: ExCoveralls],
dialyzer: [
plt_add_apps: [:ex_unit, :mix],
check_plt: true,
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
ignore_warnings: ".dialyzer_ignore.exs"
],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
"coveralls.cobertura": :test
]
]
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[
mod: {ObserverWeb.Application, []},
extra_applications: [:logger, :runtime_tools]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp package do
[
maintainers: ["Thiago Esteves"],
licenses: ["MIT"],
files: ~w(lib priv .formatter.exs mix.exs README* CHANGELOG* LICENSE*),
links: %{
Website: "https://deployex.pro",
Changelog: "#{@source_url}/blob/main/CHANGELOG.md",
GitHub: @source_url
}
]
end
defp docs do
[
main: "overview",
source_ref: "v#{@version}",
formatters: ["html"],
api_reference: false,
extra_section: "GUIDES",
extras: extras(),
groups_for_extras: groups_for_extras(),
skip_undefined_reference_warnings_on: ["CHANGELOG.md"]
]
end
defp extras do
[
"guides/overview.md",
"guides/installation.md",
"CHANGELOG.md": [filename: "changelog", title: "Changelog"]
]
end
defp groups_for_extras do
[
Introduction: ~r/guides\/introduction\/.?/,
Advanced: ~r/guides\/advanced\/.?/
]
end
defp copy_ex_doc(_) do
static_destination_path = "./doc/static"
File.mkdir_p!(static_destination_path)
File.cp_r("./guides/static", static_destination_path, fn _source, _destination ->
true
end)
end
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
{:jason, "~> 1.2"},
{:phoenix, "~> 1.7"},
{:phoenix_html, "~> 4.0"},
{:phoenix_live_view, "~> 1.0"},
{:phoenix_pubsub, "~> 2.1"},
# Dev Server
{:bandit, "~> 1.5", only: :dev},
{:esbuild, "~> 0.8", only: :dev, runtime: false},
{:faker, "~> 0.17", only: :dev},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:tailwind, "~> 0.2", only: :dev, runtime: false},
# Telemetry
{:telemetry_metrics, "~> 1.0"},
{:telemetry_poller, "~> 1.0"},
# Tooling
{:credo, "~> 1.7", only: [:test, :dev], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:floki, "~> 0.33", only: [:test, :dev]},
{:mox, "~> 1.0", only: :test},
{:excoveralls, "~> 0.18", only: :test},
{:sobelow, "~> 0.13", only: [:dev, :test], runtime: false},
{:mix_audit, "~> 2.1", only: [:dev, :test], runtime: false},
{:mock, "~> 0.3.0", only: :test},
# Docs and Publishing
{:ex_doc, "~> 0.34", only: [:dev, :test], runtime: false},
{:makeup_diff, "~> 0.1", only: :dev, runtime: false}
]
end
# Aliases are shortcuts or tasks specific to the current project.
# For example, to install project dependencies and perform other setup tasks, run:
#
# $ mix setup
#
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
docs: ["docs", ©_ex_doc/1],
"assets.build": ["tailwind default", "esbuild default"],
release: [
"assets.build",
"cmd git tag v#{@version} -f",
"cmd git push",
"cmd git push --tags",
"hex.publish --yes"
],
"test.ci": [
"format --check-formatted",
"deps.unlock --check-unused",
"credo --strict",
"deps.audit",
"sobelow --exit --threshold medium --skip -i Config.HTTPS",
"test --raise"
]
]
end
end