-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmix.exs
122 lines (113 loc) · 3.06 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
defmodule PhoenixAnalytics.MixProject do
use Mix.Project
@version "0.3.0"
def project do
[
app: :phoenix_analytics,
version: @version,
elixir: "~> 1.15",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
description: description(),
package: package(),
source_url: "https://github.com/lalabuy948/PhoenixAnalytics",
homepage_url: "https://github.com/lalabuy948/PhoenixAnalytics",
name: "PhoenixAnalytics",
docs: [
main: "PhoenixAnalytics",
formatters: ["html"],
groups_for_modules: groups_for_modules(),
api_reference: false,
extras: ["README.md"],
main: "readme"
]
]
end
def package do
[
licenses: ["Apache-2.0"],
links: %{
"GitHub" => "https://github.com/lalabuy948/PhoenixAnalytics"
},
maintainers: [
"lalabuy948"
],
files: ~w(lib priv/static/assets LICENSE mix.exs README.md .formatter.exs)
]
end
def description do
"Plug and play analytics for Phoenix applications. "
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help compile.app" to learn about applications.
def application do
[
mod: {PhoenixAnalytics.Application, []},
extra_applications: [:logger, :telemetry]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:plug, "~> 1.16"},
{:cachex, "~> 3.6"},
{:duckdbex, "~> 0.3"},
{:telemetry, "~> 1.2"},
{:live_react, "~> 0.1"},
{:elixir_uuid, "~> 1.2"},
{:phoenix_live_view, "~> 1.0.0-rc.1 or ~> 1.0"},
# --- dev deps ---
{:ex_doc, "~> 0.33", only: :dev},
{:esbuild, "~> 0.8", only: :dev, runtime: false},
{:tailwind, "~> 0.1", only: :dev, runtime: false}
]
end
defp groups_for_modules do
[
Integrations: [
PhoenixAnalytics.Plugs.RequestTracker
],
Entities: [
PhoenixAnalytics.Entities.RequestLog
],
Dashboard: [
PhoenixAnalytics.Web.Router
],
Services: [
PhoenixAnalytics.Services.Batcher,
PhoenixAnalytics.Services.Cache,
PhoenixAnalytics.Services.PubSub,
PhoenixAnalytics.Services.Telemetry,
PhoenixAnalytics.Services.Utility
],
Repository: [
PhoenixAnalytics.Repo
]
]
end
defp aliases do
[
setup: ["deps.get", "assets.setup", "assets.build"],
"assets.setup": [
"tailwind.install --if-missing",
"esbuild.install --if-missing",
"cmd --cd assets npm install"
],
"assets.build": [
"tailwind phoenix_analytics",
"esbuild phoenix_analytics"
],
"assets.watch": [
"tailwind phoenix_analytics --watch",
"esbuild phoenix_analytics --watch"
],
"assets.deploy": [
"tailwind phoenix_analytics --minify",
"esbuild phoenix_analytics --minify --metafile=meta.json"
]
]
end
end