-
Notifications
You must be signed in to change notification settings - Fork 25
/
mix.exs
124 lines (114 loc) · 3.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
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
119
120
121
122
123
124
defmodule TypeCheck.MixProject do
use Mix.Project
@source_url "https://github.com/Qqwy/elixir-type_check"
def project do
[
app: :type_check,
version: "0.13.7",
elixir: "~> 1.9",
start_permanent: Mix.env() == :prod,
deps: deps(),
description: description(),
name: "TypeCheck",
package: package(),
source_url: @source_url,
homepage_url: "https://github.com/Qqwy/elixir-type_check",
docs: docs(),
elixirc_paths: elixirc_paths(Mix.env()),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
case Mix.env() do
:prod ->
[
extra_applications: [:logger, :iex]
]
_ ->
[
extra_applications: [:logger, :iex, :stream_data, :credo]
]
end
end
def elixirc_paths(:test), do: ["lib", "test/support"]
def elixirc_paths(_), do: ["lib"]
defp description do
"""
Fast and flexible runtime type-checking: Type checks are optimized by the compiler and types can be composed, re-used and turned into property-testing generators. TypeCheck also focuses on showing understandable messages on typecheck-failures.
"""
end
defp package do
[
name: :type_check,
files: [
"lib",
"mix.exs",
"README*",
"CHANGELOG*",
"LICENSE",
"Comparing TypeCheck and Norm.md"
],
maintainers: ["Wiebe-Marten Wijnja/Qqwy"],
licenses: ["MIT"],
links: %{"GitHub" => @source_url}
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# Used for spectesting and property-tests in general:
{:stream_data, "~> 1.0", optional: true},
{:credo, "~> 1.5", runtime: false, optional: true},
# For documentation purposes:
{:ex_doc, "~> 0.22", only: :dev, runtime: false},
{:benchee, "~> 1.0", only: :bench},
{:excoveralls, "~> 0.10", only: :test},
{:dialyxir, "~> 1.0", only: [:dev], runtime: false},
# Dependency of excoveralls (only required on OTP < 25!):
{:castore, "~> 1.0"}
]
end
defp docs do
[
main: "readme",
logo: "media/type_check_logo_icon_flat_small.svg",
extras: [
"README.md": [title: "Guide/Readme"],
"CHANGELOG.md": [title: "Changelog"],
"Type-checking and spec-testing with TypeCheck.md": [title: "Introducing TypeCheck"],
"Comparing TypeCheck and Elixir Typespecs.md": [title: "Comparison to Plain Typespecs"],
"Comparing TypeCheck and Norm.md": []
],
# main: "TypeCheck",
groups_for_modules: [
Main: [
TypeCheck,
TypeCheck.Macros,
TypeCheck.Type,
TypeCheck.Spec,
TypeCheck.Options,
TypeCheck.ExUnit,
TypeCheck.External,
TypeCheck.Defstruct
],
"Errors and Formatting them": ~r"^TypeCheck.TypeError",
"Property Testing": ~r"^TypeCheck.Type.StreamData",
"Builtin Types": ~r"^TypeCheck.Builtin",
"Standard Library overrides": ~r"^TypeCheck.DefaultOverrides",
Other: ~r"^.*"
],
nest_modules_by_prefix: [TypeCheck.Builtin, TypeCheck.TypeError, TypeCheck.DefaultOverrides],
groups_for_functions: [
"Built-in Elixir types": &(&1[:typekind] == :builtin),
Extensions: &(&1[:typekind] == :extension)
]
]
end
end