-
Notifications
You must be signed in to change notification settings - Fork 5
/
mix.exs
88 lines (81 loc) · 2.22 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
defmodule ExImageInfo.Mixfile do
use Mix.Project
def project do
[
app: :ex_image_info,
description:
"ExImageInfo is an Elixir library to parse images (binaries) and get the dimensions (size), detected mime-type and overall validity for a set of image formats. It is the fastest and supports multiple formats.",
version: File.read!("VERSION") |> String.trim(),
elixir: "~> 1.3",
name: "ExImageInfo",
package: package(),
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
docs: docs(),
source_url: "https://github.com/Group4Layers/ex_image_info",
homepage_url: "https://www.group4layers.com",
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.html": :test
]
]
end
def application do
[]
end
defp deps do
[
{:excoveralls, "~> 0.18", only: :test},
{:ex_doc, "~> 0.30", only: :dev},
{:inch_ex, "~> 2.0", only: [:dev, :test]},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false}
]
end
defp aliases do
[
test_wip: ["test --only wip"],
docs: ["docs", ©_doc_to_docs/1],
lint: [
"format --check-formatted",
"deps.unlock --check-unused",
"credo --all --strict"
]
]
end
defp docs do
[
extras: ["README.md", "LICENSE.md", "CHANGELOG.md", "CONTRIBUTORS.md"],
assets: "assets/"
]
end
defp copy_doc_to_docs(_) do
# to be used in GitHub Pages (and keep doc for hexpm package)
File.rm_rf!("docs")
File.cp_r!("doc", "docs")
# File.rm_rf!("doc")
end
defp package do
[
name: :ex_image_info,
# just the minimum for prod
files: [
"lib",
"README.md",
"VERSION",
"LICENSE.md",
"mix.exs"
],
maintainers: ["nozalr <nozalr@group4layers.com>"],
licenses: ["MIT"],
links: %{
"GitHub" => "https://github.com/Group4Layers/ex_image_info",
"Docs" => "https://group4layers.github.io/ex_image_info",
"Organization" => "https://www.group4layers.com"
}
]
end
end