-
Notifications
You must be signed in to change notification settings - Fork 8
/
mix.exs
60 lines (53 loc) · 1.35 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
defmodule PlugProxy.Mixfile do
use Mix.Project
@version "0.4.0"
@github_link "https://github.com/tommy351/plug-proxy"
def project do
[
app: :plug_proxy,
version: @version,
elixir: "~> 1.6",
description: "A plug for reverse proxy server",
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
package: package(),
lockfile: lockfile(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: preferred_cli_env(),
source_url: @github_link,
homepage_url: @github_link,
docs: [main: "PlugProxy"]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp lockfile do
case System.get_env("COWBOY_VERSION") do
"1" <> _ -> "mix-cowboy1.lock"
_ -> "mix.lock"
end
end
defp deps do
[
{:cowboy, "~> 1.0 or ~> 2.4"},
{:plug, "~> 1.5"},
{:hackney, "~> 1.10"},
{:ex_doc, "~> 0.19", only: :dev, runtime: false},
{:excoveralls, "~> 0.7", only: :test, runtime: false},
{:inch_ex, "~> 0.5", only: [:dev, :test], runtime: false}
]
end
defp package do
[
maintainers: ["Tommy Chen"],
licenses: ["MIT License"],
links: %{"GitHub" => @github_link}
]
end
defp preferred_cli_env do
[
coveralls: :test,
"coveralls.travis": :test
]
end
end