forked from erlef/website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
173 lines (157 loc) · 4.54 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
170
171
172
173
defmodule Erlef.MixProject do
use Mix.Project
def project do
[
app: :erlef,
version: "0.1.0",
elixir: "~> 1.13",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
start_permanent: Mix.env() == :prod,
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [coveralls: :test, "coveralls.html": :test],
deps: deps(),
aliases: aliases(),
dialyzer: dialyzer_opts(),
name: "Erlef",
source_url: "https://github.com/erlef/website",
homepage_url: "https://erlef.org/",
docs: docs()
]
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[
mod: {Erlef.Application, []},
extra_applications: extra_applications()
]
end
defp extra_applications() do
[:logger, :runtime_tools, :os_mon, :swoosh, :plug_attack, :extwitter, :oauther]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(:dev), do: ["lib", "test/support", "test/support/fake_servers"]
defp elixirc_paths(_), do: ["lib"]
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
{:credo, "~> 1.6.4", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
{:earmark, "~> 1.4.20", override: true},
{:ecto, "~> 3.10.3"},
{:ecto_psql_extras, "~> 0.7.13"},
{:ecto_sql, "~> 3.10.2"},
{:etso, "~> 0.1.2"},
{:ex_aws, "~> 2.2.10"},
{:ex_aws_s3, "~> 2.3.2"},
{:excoveralls, "~> 0.14.4"},
{:extwitter, "~> 0.13.1"},
{:faker, "~> 0.17.0", only: [:dev, :test]},
{:floki, ">= 0.0.0", only: :test},
{:gen_smtp, "~> 1.0", override: true},
{:gettext, "~> 0.19.1"},
{:jason, "~> 1.3.0", override: true},
{:joken, "~> 2.4.1"},
{:honeybadger, "~> 0.18.1"},
{:html_sanitize_ex, "~> 1.4.2"},
{:hackney, "~> 1.18.1"},
{:logflare_logger_backend, "~> 0.11.0"},
{:mint, "~> 1.4.1", override: true},
{:mime, "~> 2.0.2"},
{:oauther, "1.3.0"},
{:phoenix, "~> 1.6.6"},
{:phoenix_ecto, "~> 4.4.0"},
{:phoenix_html, "~> 3.2.0"},
{:phoenix_live_dashboard, "~> 0.6.5"},
{:phoenix_live_reload, "~> 1.3.3", only: :dev},
{:phoenix_live_view, "~> 0.17.7"},
{:phoenix_swoosh, "~> 1.0.1"},
{:phoenix_pubsub, "~> 2.0.0"},
{:plug_attack, "~> 0.4.3"},
{:plug_cowboy, "~> 2.5.2"},
{:postgrex, ">= 0.0.0"},
{:ranch, "~> 1.7.1", override: true},
{:slugify, "~> 1.3"},
{:sobelow, "~> 0.10", only: [:dev, :test]},
{:swoosh, "~> 1.6.3"},
{:telemetry_poller, "~> 1.0"},
{:telemetry_metrics, "~> 0.6.1"}
]
end
defp aliases do
[
"ecto.setup": [
"ecto.create",
"ecto.migrate",
"run priv/repo/seeds.exs"
],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: [
"compile --warnings-as-errors",
"ecto.drop --quiet",
"ecto.create --quiet",
"ecto.migrate --quiet",
"test"
],
"eef.gen.newsletter": [&gen_newsletter/1]
]
end
def docs do
[
main: "readme",
logo: "assets/static/images/eef-avatar.png",
extras: ["README.md"]
]
end
defp gen_newsletter(_arg) do
id = 1 + (Path.wildcard("priv/posts/newsletter/**/*.md") |> Enum.count())
args = [
"newsletter",
"newsletter-#{id}",
"-a",
"eef",
"-t",
"EEF Newsletter ##{id}",
"-e",
"",
"-b",
default_newsletter_body(),
"-p",
"priv/posts/newsletter"
]
Mix.Task.run("eef.gen.post", args)
end
defp dialyzer_opts do
[
plt_add_apps: [:mix, :ex_unit],
remove_defaults: [:unknown],
checks: [
{Credo.Check.Refactor.MapInto, false},
{Credo.Check.Warning.LazyLogging, false}
],
plt_core_path: "priv/plts",
plt_file: {:no_warn, "priv/plts/erlef.plt"}
]
end
defp default_newsletter_body do
"""
## In This Newsletter
------------------------------------------------------------
Some text
## Working Group Water Cooler
------------------------------------------------------------
Some text
## Ecosystem News
------------------------------------------------------------
Some text
## See you Soon!
------------------------------------------------------------
Some text
"""
end
end