-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
122 lines (108 loc) · 2.6 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 DarkPhoenix.MixProject do
@moduledoc """
Mix project for `DarkPhoenix`.
"""
use Mix.Project
@version "1.0.0"
@name "DarkPhoenix"
@hexpm_url "http://hexdocs.pm/dark_phoenix"
@github_url "https://github.com/dark-elixir/dark_phoenix"
@description "Libraries and utils for general elixir development."
def project do
[
app: :dark_phoenix,
version: @version,
deps: deps(),
start_permanent: Mix.env() == :prod,
dialyzer: dialyzer(),
# Hex
description: @description,
package: package(),
source_url: @github_url,
# Docs
name: @name,
docs: docs()
]
end
def application do
[extra_applications: [:logger]]
end
defp deps do
[
{:dark_dev, ">= 1.0.8", only: [:dev, :test], runtime: false},
{:dark_matter, ">= 1.1.1"},
{:dark_ecto, ">= 1.0.1"},
# {:absinthe, ">= 1.5.0", optional: true},
{:oban, ">= 2.1.0"},
{:eventstore, ">= 1.1.0"},
{:opus, ">= 0.6.0"},
{:phoenix, ">= 1.5.0", optional: true},
{:ecto, ">= 3.0.0"},
{:ecto_sql, ">= 3.0.0"},
{:jason, ">= 1.0.0"}
]
end
defp package() do
[
maintainers: ["Michael Sitchenko"],
files: ~w(lib .formatter.exs mix.exs README* LICENSE* CHANGELOG*),
licenses: ["Apache-2.0"],
links: %{"GitHub" => @github_url}
]
end
defp docs do
[
main: @name,
source_ref: "v#{@version}",
canonical: @hexpm_url,
logo: "guides/images/dark-elixir.png",
extra_section: "GUIDES",
source_url: @github_url,
extras: extras(),
groups_for_extras: groups_for_extras(),
groups_for_modules: []
]
end
def extras() do
[
# "guides/introduction/Getting Started.md",
"README.md"
]
end
defp groups_for_extras do
[
# Introduction: ~r/guides\/introduction\/.?/,
]
end
defp dialyzer do
[
plt_add_deps: :app_tree,
plt_add_apps: [:ex_unit, :ecto],
list_unused_filters: true,
flags: [
# Useful additions
:error_handling,
:no_opaque,
:race_conditions,
:underspecs,
:unmatched_returns,
# Strict (annoying / low-impact)
# :overspecs,
# :specdiffs,
# Less common / potentially confusing
# (Can disable without much consequence)
:no_behaviours,
:no_contracts,
:no_fail_call,
:no_fun_app,
:no_improper_lists,
:no_match,
:no_missing_calls,
:no_return,
:no_undefined_callbacks,
:no_unused,
:unknown
]
]
end
end