-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
101 lines (91 loc) · 2.69 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
defmodule Exneus.MixProject do
use Mix.Project
@version "0.1.0"
@source_url "https://github.com/williamthome/exneus"
def project do
[
app: :exneus,
version: @version,
elixir: "~> 1.12",
start_permanent: Mix.env() == :prod,
aliases: aliases(),
preferred_cli_env: [
ci: :test,
"benchmark.decode": :benchmark,
"benchmark.encode": :benchmark
],
deps: deps(),
elixirc_paths: elixirc_paths(Mix.env()),
test_coverage: [
summary: [threshold: 100]
],
# Hex
description:
"An incredibly flexible and performant JSON parser, generator and formatter for Elixir",
package: package(),
# Docs
name: "Exneus",
docs: docs()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
defp aliases do
[
ci: [
"compile --warnings-as-errors",
"format --check-formatted",
"test"
],
"benchmark.decode": ["run benchmark/exneus_decode_benchmark.exs"],
"benchmark.encode": ["run benchmark/exneus_encode_benchmark.exs"]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:euneus, "~> 2.3"},
{:json_polyfill, "~> 0.1", only: :polyfill, runtime: false},
# dev
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.34", only: :dev, runtime: false},
# benchmark
{:benchee, "~> 1.1", only: :benchmark, runtime: false},
{:benchee_html, "~> 1.0", only: :benchmark, runtime: false},
{:benchee_markdown, "~> 0.3", only: :benchmark, runtime: false},
{:thoas, "~> 1.2", only: :benchmark, runtime: false},
{:jason, "~> 1.4", only: :benchmark, runtime: false},
{:json, "~> 1.4", only: :benchmark, runtime: false},
{:jsone, "~> 1.6", only: :benchmark, runtime: false},
{:jsx, "~> 3.1", only: :benchmark, runtime: false},
{:jiffy, "~> 1.1", only: :benchmark, runtime: false}
]
end
defp elixirc_paths(:benchmark), do: ["lib", "benchmark"]
defp elixirc_paths(_), do: ["lib"]
defp package do
[
maintainers: ["William Fank Thomé"],
licenses: ["Apache-2.0"],
links: %{"GitHub" => @source_url},
files: ~w(.formatter.exs mix.exs README.md CHANGELOG.md lib)
]
end
defp docs do
[
main: "Exneus",
source_ref: "v#{@version}",
source_url: @source_url,
assets: %{"benchmark/assets" => "assets"},
extras: [
"README.md": [title: "Overview"],
"LICENSE.md": [title: "License"],
"benchmark/BENCHMARK.md": [title: "Benchmark"]
]
]
end
end