-
Notifications
You must be signed in to change notification settings - Fork 8
/
mix.exs
126 lines (116 loc) · 3.04 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
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
121
122
123
124
125
126
defmodule Md.MixProject do
use Mix.Project
@app :md
@version "0.10.6"
def project do
[
app: @app,
version: @version,
elixir: "~> 1.12",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
package: package(),
xref: [exclude: []],
description: description(),
deps: deps(),
aliases: aliases(),
docs: docs(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
credo: :ci,
dialyzer: :ci,
tests: :test,
"coveralls.json": :test,
"coveralls.html": :test,
"quality.ci": :ci
],
dialyzer: [
plt_file: {:no_warn, ".dialyzer/plts/dialyzer.plt"},
plt_add_apps: [:floki],
ignore_warnings: ".dialyzer/ignore.exs"
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger, :inets],
mod: {Md.Application, []}
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(:ci), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:xml_builder_ex, "~> 3.1"},
{:unicode_guards, "~> 1.0"},
{:floki, "~> 0.33", optional: Mix.env() != :dev},
{:credo, "~> 1.0", only: :ci, runtime: false},
{:excoveralls, "~> 0.14", only: :test, runtime: false},
{:dialyxir, "~> 1.0", only: :ci, runtime: false},
{:ex_doc, ">= 0.0.0", only: [:ci, :dev]},
{:mneme, "~> 0.3", only: :test},
{:benchfella, "~> 0.3", only: :ci},
{:earmark, "~> 1.4", only: :ci}
]
end
defp aliases do
[
quality: ["format", "credo --strict", "dialyzer"],
tests: ["coveralls.html --trace"],
"quality.ci": [
"format --check-formatted",
"credo --strict",
"dialyzer --halt-exit-status"
]
]
end
defp description do
"""
Custom extendable markdown parser.
"""
end
defp package do
[
name: @app,
files: ~w|lib stuff/logo-48x48.png mix.exs README.md|,
maintainers: ["Aleksei Matiushkin"],
licenses: ["MIT"],
links: %{
"GitHub" => "https://github.com/am-kantox/#{@app}",
"Docs" => "https://hexdocs.pm/#{@app}"
}
]
end
defp docs do
[
main: "Md",
source_ref: "v#{@version}",
canonical: "http://hexdocs.pm/#{@app}",
logo: "stuff/logo-48x48.png",
source_url: "https://github.com/am-kantox/#{@app}",
extras: ~w[README.md],
groups_for_modules: [
# Md,
# Md.Listener,
# Md.Parser,
# Md.Transforms,
"Parser Internals": [
Md.Parser.Default,
Md.Parser.State,
Md.Parser.Syntax,
Md.Parser.Syntax.Void
],
"Custom Transforms": [
Md.Transforms.Anchor,
Md.Transforms.Footnote,
Md.Transforms.Soundcloud,
Md.Transforms.TwitterHandle,
Md.Transforms.Youtube
]
]
]
end
end