forked from Kraigie/nostrum
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmix.exs
118 lines (107 loc) · 2.61 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
defmodule Nostrum.Mixfile do
@moduledoc false
use Mix.Project
def project do
[
app: :nostrum,
version: "0.5.1",
elixir: "~> 1.11",
elixirc_paths: elixirc_paths(Mix.env()),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
description: "An Elixir Discord library",
package: package(),
name: "Nostrum",
source_url: "https://github.com/Kraigie/nostrum",
homepage_url: "https://github.com/Kraigie/nostrum",
deps: deps(),
docs: docs(),
dialyzer: dialyzer(),
aliases: aliases()
]
end
defp elixirc_paths(:test), do: ["lib", "test"]
defp elixirc_paths(_), do: ["lib"]
def application do
[
extra_applications: [:logger, :inets],
mod: {Nostrum.Application, []}
]
end
# "How to" shamelessly copied from the nerves project.
# https://github.com/nerves-project/nerves/tree/master/docs
def docs do
[
main: "intro",
extras: extras(),
groups_for_modules: groups_for_modules(),
groups_for_functions: groups_for_functions(),
source_ref: "master",
assets: "docs/assets",
nest_modules_by_prefix: [Nostrum.Cache]
]
end
def extras do
[
"docs/static/Intro.md",
"docs/static/API.md",
"docs/static/Application Commands.md",
"docs/static/State.md",
"docs/static/Events.md",
"docs/static/Consumers.md",
"docs/static/Voice.md",
"docs/static/Gateway Intents.md"
]
end
def groups_for_modules do
[
Api: [
~r/Nostrum.Api/
],
Cache: [
~r/Nostrum.Cache/
],
Structs: [
~r/Nostrum.Struct/
]
]
end
defp groups_for_functions,
do: []
def aliases do
[
lint: ["format --check-formatted", "credo --strict"]
]
end
def package do
[
name: :nostrum,
licenses: ["MIT"],
maintainers: ["Craig Dazey", "Johannes Christ", "Joe Banks"],
links: %{
"GitHub" => "https://github.com/Kraigie/nostrum/",
"Docs" => "https://kraigie.github.io/nostrum/"
}
]
end
defp deps do
[
{:jason, "~> 1.2"},
{:gun, "== 2.0.1", hex: :remedy_gun},
{:certifi, "~> 2.8"},
{:kcl, "~> 1.4"},
{:mime, "~> 1.6 or ~> 2.0"},
{:ex_doc, "~> 0.28", only: :dev},
{:credo, "~> 1.4", only: [:dev, :test]},
{:dialyxir, "~> 1.1", only: [:dev], runtime: false},
{:gen_stage, "~> 0.11 or ~> 1.0"},
{:recon, "~> 2.3", only: :dev, optional: true}
]
end
def dialyzer do
[
plt_add_deps: :transitive,
plt_add_apps: [:mix]
]
end
end