forked from omohokcoj/filterable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
87 lines (77 loc) · 2.27 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
defmodule Filterable.Mixfile do
use Mix.Project
@name "Filterable"
@project_url "https://github.com/omohokcoj/filterable"
@version "0.7.4"
def project do
[
app: :filterable,
name: @name,
version: @version,
elixir: "~> 1.3",
source_url: @project_url,
homepage_url: @project_url,
description: description(),
elixirc_paths: elixirc_paths(Mix.env()),
package: package(),
deps: deps(),
aliases: aliases(),
docs: docs(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.travis": :test,
"coveralls.html": :test
]
]
end
def application do
[applications: applications(Mix.env())]
end
defp deps do
[
{:ex_doc, "~> 0.19", only: [:dev, :docs]},
{:credo, "~> 0.10.2", only: [:dev, :test]},
{:excoveralls, "~> 0.10", only: :test},
{:plug, "~> 1.6", only: :test},
{:postgrex, ">= 0.0.0", only: :test},
{:ecto, "~> 2.2", only: [:dev, :test]},
{:inch_ex, ">= 0.0.0", only: [:dev, :docs]},
{:dialyxir, "~> 0.5", only: [:dev, :test], runtime: false}
]
end
defp description do
"""
Filtering from incoming params in Elixir/Ecto/Phoenix with easy to use DSL.
"""
end
defp package do
[
name: :filterable,
files: ["lib", "mix.exs", "README*", "config"],
maintainers: ["Pete Matsyburka"],
licenses: ["MIT"],
links: %{"GitHub" => @project_url, "Docs" => "https://hexdocs.pm/filterable"}
]
end
defp applications(:test), do: applications() ++ ~w(postgrex ecto plug)a
defp applications(_), do: applications()
defp applications(), do: ~w(logger)a
defp elixirc_paths(:test), do: elixirc_paths() ++ ~w(test/support)
defp elixirc_paths(_), do: elixirc_paths()
defp elixirc_paths(), do: ~w(lib)
defp docs do
[main: "readme", source_url: @project_url, extras: ["README.md"]]
end
defp aliases do
[
"ecto.seed": "run priv/repo/seeds.exs",
"ecto.setup": ["ecto.create", "ecto.migrate", "ecto.seed"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.reset", "test"]
]
end
end