-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmix.exs
84 lines (77 loc) · 2.22 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
defmodule UnionTypespec.MixProject do
use Mix.Project
def project do
[
app: :union_typespec,
version: "0.0.4",
elixir: "~> 1.12",
package: package(),
source_url: "https://github.com/felt/union_typespec",
description: "A simple, tiny library for defining an Elixir @type whose values are one of a few options",
consolidate_protocols: Mix.env() != :test,
deps: deps(),
aliases: aliases(),
test_coverage: [tool: ExCoveralls],
elixirc_paths: elixirc_paths(Mix.env()),
docs: docs(),
preferred_cli_env: [
check: :test,
coveralls: :test,
"coveralls.detail": :test,
"coveralls.html": :test
],
dialyzer: [
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
flags: [:error_handling, :unknown],
# Error out when an ignore rule is no longer useful so we can remove it
list_unused_filters: true
]
]
end
def application do
[]
end
defp package() do
[
# These are the default files included in the package
files: ~w(lib .formatter.exs mix.exs README* LICENSE* CHANGELOG*),
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/felt/union_typespec"}
]
end
defp deps do
[
{:credo, "~> 1.7.0", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.2", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.18.0", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.27", only: :dev, runtime: false}
]
end
defp elixirc_paths(:test), do: ~w(lib test/support)
defp elixirc_paths(_env), do: ~w(lib)
# Aliases are shortcuts or tasks specific to the current project.
# For example, to install project dependencies and perform other setup tasks, run:
#
# $ mix setup
#
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
check: [
"clean",
"deps.unlock --check-unused",
"compile --warnings-as-errors",
"format --check-formatted",
"deps.unlock --check-unused",
"test --warnings-as-errors",
"credo"
]
]
end
defp docs do
[
extras: ~w(CHANGELOG.md README.md),
main: "readme"
]
end
end