forked from appunite/link_preview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
87 lines (76 loc) · 2.12 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 LinkPreview.Mixfile do
use Mix.Project
@version "1.0.2"
def project do
[
aliases: aliases(),
app: :link_preview,
deps: deps(),
description: description(),
docs: [
extras: ["README.md", "CHANGELOG.md"]
],
elixir: "~> 1.3",
elixirc_paths: elixirc_paths(Mix.env),
homepage_url: "https://appunite.com",
name: "Link Preview",
package: package(),
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.travis": :test
],
source_url: "https://github.com/appunite/link_preview",
test_coverage: [
tool: ExCoveralls
],
version: @version
]
end
defp description do
"""
LinkPreview is a package that tries to receive meta information from given http(s) address.
Generated page struct includes website title, description, images and more.
"""
end
defp package do
[
files: ["lib", "config", "mix.exs", "README.md", "CHANGELOG.md"],
maintainers: ["Tobiasz Małecki", "Karol Wojtaszek"],
licenses: ["Apache 2.0"],
links: %{
"GitHub" => "https://github.com/appunite/link_preview",
"Sponsor" => "https://appunite.com"
}
]
end
def application do
[applications: applications(Mix.env)]
end
def applications(:all), do: [:floki, :inets, :logger, :tesla]
def applications(:test), do: applications(:all) ++ [:httparrot]
def applications(_), do: applications(:all)
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
#required
{:floki, "~> 0.10.0"},
{:tesla, "~> 0.7.1"},
#optional
{:html_entities, "~> 0.2", optional: true},
{:mogrify, "~> 0.4.0", optional: true},
{:tempfile, "~> 0.1.0", optional: true},
#testing/docs
{:excoveralls, "~> 0.6", only: :test},
{:ex_doc, "~> 0.12", only: :dev},
{:httparrot, "~> 0.5.0", only: :test},
{:mock, "~> 0.1", only: :test}
]
end
defp aliases do
[
"test": ["test --exclude excluded"]
]
end
end