Repository navigation
Expand file tree
/
Copy pathmix.exs
More file actions
84 lines (72 loc) · 1.96 KB
/
Copy pathmix.exs
File metadata and controls
84 lines (72 loc) · 1.96 KB
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
defmodule WebSockex.Mixfile do
use Mix.Project
def project do
[
aliases: aliases(),
app: :websockex,
name: "WebSockex",
version: "0.5.1",
elixir: "~> 1.11",
description: "An Elixir WebSocket client",
source_url: "https://github.com/Azolo/websockex",
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
package: package(),
deps: deps(),
docs: docs()
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
def application do
applications = [:logger, :ssl, :crypto] ++ applications(otp_release())
[extra_applications: applications, mod: {WebSockex.Application, []}]
end
defp applications(otp_release) when otp_release >= 21 do
[:telemetry]
end
defp applications(_), do: []
defp aliases do
[
lint: [
"compile --warnings-as-errors",
"format --check-formatted",
"credo --only warning",
"dialyzer"
]
]
end
defp deps do
[
{:castore, "~> 0.1 or ~> 1.0", optional: true},
{:ex_doc, "~> 0.27", only: :dev, runtime: false},
{:cowboy, "~> 2.9", only: :test},
{:plug_cowboy, "~> 2.5", only: :test},
{:plug, "~> 1.12", only: :test},
{:credo, "~> 1.7", only: :dev, runtime: false},
{:dialyxir, "~> 1.4", only: :dev, runtime: false}
] ++ optional_deps(otp_release())
end
defp optional_deps(otp_release) when otp_release >= 21 do
[{:telemetry, "~> 1.0"}]
end
defp optional_deps(_), do: []
defp package do
%{
name: :websockex,
licenses: ["MIT"],
maintainers: ["Dominic Letz"],
links: %{"GitHub" => "https://github.com/witchtails/websockex_wt"}
}
end
defp docs do
[
extras: ["README.md"],
main: "readme"
]
end
defp otp_release do
:erlang.system_info(:otp_release) |> to_string() |> String.to_integer()
end
end