-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmix.exs
101 lines (93 loc) · 2.81 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
defmodule TypedStructor.MixProject do
use Mix.Project
@version "0.5.0"
@source_url "https://github.com/elixir-typed-structor/typed_structor"
def project do
[
app: :typed_structor,
description: "TypedStructor is a library for defining structs with types effortlessly.",
version: @version,
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
consolidate_protocols: Mix.env() != :test,
deps: deps(),
name: "TypedStructor",
source: @source_url,
homepage_url: @source_url,
docs: [
main: "readme",
source_url: @source_url,
source_ref: "v#{@version}",
extra_section: "Guides",
groups_for_extras: [
Guides: ~r<(guides/[^\/]+\.md)|(README.md)>,
Plugins: ~r{guides/plugins/[^\/]+\.md}
],
extras: [
{"CHANGELOG.md", [title: "Changelog"]},
# guides
{"README.md", [title: "Introduction"]},
"guides/migrate_from_typed_struct.md",
# plugins
{"guides/plugins/introduction.md", [title: "Introduction to the plugin system"]},
"guides/plugins/registering_plugins_globally.md",
"guides/plugins/accessible.md",
"guides/plugins/reflection.md",
"guides/plugins/doc_fields.md",
"guides/plugins/type_only_on_ecto_schema.md",
"guides/plugins/primary_key_and_timestamps.md",
"guides/plugins/derive_jason.md",
"guides/plugins/derive_enumerable.md"
],
nest_modules_by_prefix: [
TypedStructor.Definer
]
],
package: [
name: "typed_structor",
licenses: ["MIT"],
links: %{
"Changelog" => "https://hexdocs.pm/typed_structor/changelog.html",
"GitHub" => @source_url
}
],
test_coverage: [
summary: [threshold: 100],
ignore_modules: [
TypedStructor.Definition,
TypedStructor.GuideCase,
TypedStructor.TestCase
]
],
aliases: aliases()
]
end
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
{:ex_doc, "~> 0.31", only: :dev, runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:ecto, "~> 3.0", only: [:dev, :test], optional: true},
{:jason, "~> 1.4", only: [:dev, :test], optional: true},
{:makeup_diff, "~> 0.1", only: [:test, :dev], runtime: false}
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp aliases do
[
check: [
"format",
"compile --warning-as-errors",
"credo --strict",
"dialyzer"
]
]
end
end