-
Notifications
You must be signed in to change notification settings - Fork 2
/
mix.exs
76 lines (66 loc) · 1.74 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
defmodule Assoc.MixProject do
use Mix.Project
@version "0.2.3"
def project do
[
app: :assoc,
version: @version,
build_path: "./_build",
config_path: "./config/config.exs",
deps_path: "./deps",
lockfile: "./mix.lock",
elixir: "~> 1.12",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
description: description(),
package: package(),
# Docs
name: "Assoc",
source_url: "https://github.com/chrislaskey/assoc",
docs: [
main: "readme",
extras: [
"README.md",
"CHANGELOG.md"
]
]
]
end
defp elixirc_paths(:test), do: ["lib", "test/setup", "test/support"]
defp elixirc_paths(_), do: ["lib"]
def application do
default_options = [
extra_applications: [:logger]
]
case Mix.env() do
:test -> Keyword.put(default_options, :mod, {Assoc.Test.Application, []})
_ -> default_options
end
end
defp deps do
[
{:ecto_sql, "~> 3.0", only: :test},
{:postgrex, ">= 0.0.0", only: :test},
{:ex_doc, "~> 0.25", only: :dev, runtime: false}
]
end
defp aliases do
[
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate", "test"]
]
end
defp description do
"An easy way to manage many_to_many, has_many and belongs_to Ecto associations"
end
defp package() do
[
files: ~w(lib priv .formatter.exs mix.exs README* LICENSE* CHANGELOG*),
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/chrislaskey/assoc"}
]
end
end