-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmix.exs
138 lines (125 loc) · 3.82 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
defmodule TelemetryUI.Mixfile do
use Mix.Project
@version "5.0.0"
def project do
[
app: :telemetry_ui,
version: @version,
elixir: "~> 1.17",
package: package(),
elixirc_paths: elixirc_paths(Mix.env()),
consolidate_protocols: Mix.env() !== :test,
compilers: Mix.compilers(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
aliases: aliases(),
xref: [exclude: IEx],
description: "Telemetry based metrics UI",
source_url: "https://github.com/mirego/telemetry_ui",
homepage_url: "https://github.com/mirego/telemetry_ui",
docs: [
extras: ["README.md", "guides/application-data.md", "guides/custom-ui.md", "guides/multi-metrics-endpoints.md"],
extra_section: "GUIDES",
groups_for_modules: [
TelemetryUI: [
TelemetryUI,
TelemetryUI.Metrics,
TelemetryUI.Theme
],
Backend: [
TelemetryUI.Backend,
TelemetryUI.Backend.EctoPostgres,
TelemetryUI.Backend.EctoPostgres.Migrations
],
Web: [
TelemetryUI.Web,
TelemetryUI.Web.Share,
TelemetryUI.Web.Component
],
Reports: [
TelemetryUI.Digest,
TelemetryUI.Digest.Slack,
TelemetryUI.Digest.Worker
]
],
main: "readme",
source_ref: "v#{@version}",
source_url: "https://github.com/mirego/telemetry_ui"
],
deps: deps()
]
end
def application do
[mod: [], extra_applications: [:inets]]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
{:phoenix, "~> 1.4"},
{:phoenix_ecto, "~> 4.4"},
{:phoenix_view, "~> 1.0 or ~> 2.0"},
{:jason, "~> 1.0"},
{:ecto, "~> 3.0"},
{:ecto_sql, "~> 3.0"},
{:postgrex, "~> 0.16"},
{:telemetry, "~> 1.0"},
{:telemetry_metrics, ">= 0.6.0"},
{:telemetry_poller, "~> 1.0"},
{:timex, "~> 3.7"},
{:oban, "~> 2.13", optional: true},
# Frontend
{:vega_lite, "~> 0.1"},
{:phoenix_html, "~> 3.0 or ~> 4.0"},
{:phoenix_live_view, "~> 0.18 or ~> 1.0"},
# Images
{:vega_lite_convert, "~> 1.0"},
# Asset
{:tailwind, "~> 0.1", only: [:dev, :test], runtime: false},
{:esbuild, "~> 0.5", only: [:dev, :test], runtime: false},
{:phoenix_live_reload, "~> 1.0", only: :dev},
# Linting
{:credo, "~> 1.1", only: [:dev, :test]},
{:credo_envvar, "~> 0.1", only: [:dev, :test], runtime: false},
{:credo_naming, "~> 2.0", only: [:dev, :test], runtime: false},
{:styler, "~> 1.0", only: [:dev, :test], runtime: false},
# Docs
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
# Test
{:factori, ">= 0.0.0", only: :test},
{:mimic, "~> 1.7", only: :test}
]
end
defp aliases do
[
"assets.setup": [
"tailwind.install --if-missing",
"esbuild.install --if-missing",
"cmd --cd assets npm install"
],
"assets.build": ["esbuild telemetry_ui", "tailwind default"],
"assets.watch.esbuild": ["esbuild telemetry_ui --watch"],
"assets.watch.tailwind": ["tailwind telemetry_ui --watch"],
"assets.deploy": [
"tailwind telemetry_ui --minify",
"esbuild telemetry_ui --minify --metafile=meta.json"
],
test: ["ecto.create --quiet", "ecto.migrate", "test"]
]
end
defp package do
[
maintainers: ["Simon Prévost"],
licenses: ["BSD-3-Clause"],
links: %{github: "https://github.com/mirego/telemetry_ui"},
files: [
"lib",
"priv/static/assets",
"LICENSE.md",
"mix.exs",
"README.md",
".formatter.exs"
]
]
end
end