-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmix.exs
More file actions
132 lines (123 loc) · 3.59 KB
/
mix.exs
File metadata and controls
132 lines (123 loc) · 3.59 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
defmodule Image.Plug.MixProject do
use Mix.Project
@version "0.1.0-rc.0"
@source_url "https://github.com/kipcole9/image_plug"
def project do
[
app: :image_plug,
version: @version,
elixir: "~> 1.17",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
package: package(),
description: description(),
source_url: @source_url,
docs: docs(),
dialyzer: [
plt_add_apps: [:plug, :ex_unit],
flags: [:error_handling, :unknown, :extra_return]
]
]
end
def application do
[
extra_applications: [:logger],
mod: {Image.Plug.Application, []}
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_env), do: ["lib"]
defp deps do
[
{:plug, "~> 1.16"},
image_dep(),
{:vix, "~> 0.38"},
{:telemetry, "~> 1.2"},
{:req, "~> 0.5", optional: true},
{:bandit, "~> 1.5", only: [:dev, :test]},
{:bypass, "~> 2.1", only: [:test]},
{:stream_data, "~> 1.1", only: [:test]},
{:ex_doc, "~> 0.34", only: [:dev, :release], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev], runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false}
]
end
defp description do
"A pluggable Plug-based image server. Maps URLs to a canonical image " <>
"processing pipeline executed via the Image library, with named, " <>
"stored variants. Ships a Cloudflare Images URL provider."
end
# Prefer a sibling `../image` checkout during local
# development so unpublished work in `:image` is picked up
# without needing to publish first. Falls back to the
# published version constraint when no sibling checkout
# exists, which is the normal case for downstream users.
defp image_dep do
if File.exists?(Path.join(__DIR__, "../image/mix.exs")) do
{:image, path: "../image", override: true}
else
{:image, "~> 0.67"}
end
end
defp package do
[
maintainers: ["Kip Cole"],
licenses: ["Apache-2.0"],
links: %{"GitHub" => @source_url},
files: [
"lib",
"mix.exs",
"README.md",
"CHANGELOG.md",
"LICENSE.md",
"logo.jpg",
"guides",
"plans"
]
]
end
defp docs do
[
main: "readme",
logo: "logo.jpg",
extras: [
"README.md",
"guides/usage.md",
"guides/sources.md",
"guides/face_aware.md",
"guides/cdn_origin.md",
"guides/cloudflare_conformance.md",
"guides/imgix_conformance.md",
"guides/cloudinary_conformance.md",
"guides/image_kit_conformance.md",
"guides/iiif_conformance.md",
"CHANGELOG.md"
],
groups_for_extras: [
"Guides": ~r{guides/},
"About": ["README.md", "CHANGELOG.md"]
],
source_ref: "v#{@version}",
groups_for_modules: [
"Public API": [
Image.Plug,
Image.Plug.Admin,
Image.Plug.Pipeline,
Image.Plug.Provider,
Image.Plug.Source,
Image.Plug.SourceResolver,
Image.Plug.Variant,
Image.Plug.VariantStore,
Image.Plug.Capabilities,
Image.Plug.Error
],
"Pipeline operations": ~r/^Image\.Plug\.Pipeline\.Ops/,
"Cloudflare provider": ~r/^Image\.Plug\.Provider\.Cloudflare/,
"Default source resolvers": ~r/^Image\.Plug\.SourceResolver\.[A-Z]/,
"Default variant stores": ~r/^Image\.Plug\.VariantStore\.[A-Z]/,
"Internals": ~r/^Image\.Plug\./
]
]
end
end