-
Notifications
You must be signed in to change notification settings - Fork 84
/
mix.exs
92 lines (86 loc) · 2.55 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
defmodule Bandit.MixProject do
use Mix.Project
def project do
[
app: :bandit,
version: "1.6.0",
elixir: "~> 1.13",
start_permanent: Mix.env() == :prod,
deps: deps(),
elixirc_paths: elixirc_path(Mix.env()),
dialyzer: dialyzer(),
name: "Bandit",
description: "A pure-Elixir HTTP server built for Plug & WebSock apps",
source_url: "https://github.com/mtrudel/bandit",
package: [
maintainers: ["Mat Trudel"],
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/mtrudel/bandit"},
files: ["lib", "mix.exs", "README*", "LICENSE*", "CHANGELOG*"]
],
docs: docs()
]
end
def application do
[extra_applications: [:logger], mod: {Bandit.Application, []}]
end
defp deps do
[
{:thousand_island, "~> 1.0"},
{:plug, "~> 1.14"},
{:websock, "~> 0.5"},
{:hpax, "~> 1.0"},
{:telemetry, "~> 0.4 or ~> 1.0"},
{:req, "~> 0.3", only: [:dev, :test]},
{:machete, ">= 0.0.0", only: [:dev, :test]},
{:ex_doc, "~> 0.24", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
{:credo, "~> 1.0", only: [:dev, :test], runtime: false},
{:mix_test_watch, "~> 1.0", only: :dev, runtime: false}
]
end
defp elixirc_path(:test), do: ["lib/", "test/support"]
defp elixirc_path(_), do: ["lib/"]
defp dialyzer do
[
plt_core_path: "priv/plts",
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
plt_add_deps: :apps_direct,
plt_add_apps: [:ssl, :public_key],
flags: [
"-Werror_handling",
"-Wextra_return",
"-Wmissing_return",
"-Wunknown",
"-Wunmatched_returns",
"-Wunderspecs"
]
]
end
defp docs do
[
extras: [
"CHANGELOG.md": [title: "Changelog"],
"README.md": [title: "README"],
"lib/bandit/http1/README.md": [
filename: "HTTP1_README.md",
title: "HTTP/1 Implementation Notes"
],
"lib/bandit/http2/README.md": [
filename: "HTTP2_README.md",
title: "HTTP/2 Implementation Notes"
],
"lib/bandit/websocket/README.md": [
filename: "WebSocket_README.md",
title: "WebSocket Implementation Notes"
]
],
groups_for_extras: [
"Implementation Notes": Path.wildcard("lib/bandit/*/README.md")
],
skip_undefined_reference_warnings_on: Path.wildcard("**/*.md"),
main: "Bandit",
logo: "assets/ex_doc_logo.png"
]
end
end