-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
120 lines (107 loc) · 2.9 KB
/
mix.exs
File metadata and controls
120 lines (107 loc) · 2.9 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
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
defmodule NestedSets.MixProject do
use Mix.Project
@source_url "https://github.com/AlexGx/nested_sets"
@version "0.1.0"
def project do
[
app: :nested_sets,
version: @version,
elixir: "~> 1.16",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
docs: docs(),
package: package(),
description: description(),
source_url: @source_url,
homepage_url: @source_url,
dialyzer: dialyzer(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
]
]
end
def cli do
[preferred_envs: ["test.setup": :test, test: :test]]
end
def application do
[
extra_applications: [:logger]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(:dev), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
{:ecto, "~> 3.12"},
{:ecto_sql, "~> 3.10"},
{:postgrex, "~> 0.20", optional: true},
{:ecto_sqlite3, "~> 0.21", optional: true},
{:myxql, "~> 0.8", optional: true},
# Dev and test deps
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.38", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.18", only: :test}
]
end
defp aliases do
[
"ecto.setup": ["ecto.create", "ecto.migrate"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
"test.setup": ["ecto.drop --quiet", "ecto.create", "ecto.migrate"],
lint: ["format", "dialyzer"],
"cover.html": ["cmd MIX_ENV=test mix coveralls.html"],
"cover.html.open": ["cover.html", "cmd open cover/excoveralls.html"]
]
end
defp package do
[
name: "nested_sets",
maintainers: ["Alexander Gubarev"],
licenses: ["MIT"],
links: %{GitHub: @source_url},
files: ~w[lib .formatter.exs mix.exs README* LICENSE*]
]
end
defp dialyzer do
[
plt_add_apps: [:mix, :ex_unit, :ecto, :ecto_sql, :postgrex, :myxql],
plt_core_path: "_build/#{Mix.env()}",
flags: [:error_handling, :missing_return, :underspecs],
ignore_warnings: ".dialyzer_ignore.exs"
]
end
defp docs do
[
main: "readme",
source_ref: "v#{@version}",
extras: docs_guides(),
groups_for_modules: [
"Test Support": [
NestedSets.Test.Schemas,
NestedSets.Fixtures,
NestedSets.Case
],
Schema: [NestedSets.Schema]
]
]
end
defp docs_guides do
[
"README.md",
"guides/installation.md"
]
end
defp description do
"""
Battle-tested NestedSets for Ecto that supports PostgreSQL, SQLite, and MySQL.
"""
end
end