-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmix.exs
More file actions
150 lines (127 loc) · 3.57 KB
/
Copy pathmix.exs
File metadata and controls
150 lines (127 loc) · 3.57 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
defmodule DocSpec.MixProject do
use Mix.Project
@version "1.3.4"
@source_url "https://github.com/docspec/docspec-ex"
def project do
[
app: :docspec,
version: @version,
elixir: "~> 1.18",
start_permanent: Mix.env() == :prod,
deps: deps(),
dialyzer: dialyzer_config(Mix.env()),
elixirc_paths: elixirc_paths(Mix.env()),
elixirc_options: [warnings_as_errors: true],
test_coverage: [tool: ExCoveralls],
test_ignore_filters: [~r/test\/snapshots\//],
escript: escript(),
releases: releases(),
# Docs
name: "DocSpec",
description: "DocSpec core library",
source_url: @source_url,
docs: docs(),
package: package()
]
end
def cli do
[
preferred_envs: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
"coveralls.cobertura": :test
]
]
end
defp docs do
[
main: "readme",
extras: ["README.md", "CHANGELOG.md"],
source_ref: "v#{@version}",
source_url: @source_url
]
end
defp package do
[
licenses: ["EUPL-1.2"],
links: %{"GitHub" => @source_url},
files: ~w(lib mix.exs README.md CHANGELOG.md LICENSE)
]
end
defp dialyzer_config(:test),
do: [plt_add_apps: [:ex_unit], warnings_as_errors: true]
defp dialyzer_config(_),
do: [warnings_as_errors: true]
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp escript do
[
main_module: DocSpec.CLI,
name: "docspec",
path: "dist/docspec-escript"
]
end
defp releases do
[
docspec: [
applications: [docspec: :permanent],
steps: [:assemble, &Burrito.wrap/1],
burrito: [
targets: [
linux_x86_64: [os: :linux, cpu: :x86_64],
linux_aarch64: [os: :linux, cpu: :aarch64],
linux_musl_x86_64: [os: :linux, cpu: :x86_64, libc: :musl],
linux_musl_aarch64: [os: :linux, cpu: :aarch64, libc: :musl],
macos_x86_64: [os: :darwin, cpu: :x86_64],
macos_aarch64: [os: :darwin, cpu: :aarch64],
windows_x86_64: [os: :windows, cpu: :x86_64]
]
]
]
]
end
def application do
[
extra_applications: [:logger],
mod: {DocSpec.Application, []}
]
end
defp deps do
[
# Schema definitions with Ecto types
{:ecto, "~> 3.12"},
{:typed_ecto_schema, "~> 0.4"},
{:polymorphic_embed, "~> 5.0"},
# Defining data structures
{:typed_struct, "~> 0.3.0"},
# JSON Parsing
{:jason, "~> 1.4"},
# HTML Parsing
{:floki, "~> 0.38"},
# XML Parsing
{:saxy, "~> 1.6"},
{:simple_form, "~> 1.0"},
# Utilities
{:useful, "~> 1.0"},
{:recase, "~> 0.9"},
{:html_entities, "~> 0.5"},
{:temp, "~> 0.4"},
# Testing
{:excoveralls, "~> 0.18", only: :test},
{:mimic, "~> 2.1", only: :test},
{:briefly, "~> 0.5", only: :test},
{:exposure, "~> 1.1", only: [:dev, :test], runtime: false},
# Linting & static analysis
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
# Dependency auditing
{:mix_audit, "~> 2.1", only: [:dev, :test], runtime: false},
# Docs
{:ex_doc, "~> 0.38", only: :dev, runtime: false},
# Native binary packaging (prod-only, provides Burrito.Util.Args at runtime)
{:burrito, "~> 1.0", only: :prod}
]
end
end