Skip to content

Commit ac087d6

Browse files
committed
Prepare for publishing
1 parent 351030f commit ac087d6

File tree

1 file changed

+56
-5
lines changed

1 file changed

+56
-5
lines changed

mix.exs

Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,48 @@
11
defmodule SafeURL.MixProject do
22
use Mix.Project
33

4+
5+
@app :safeurl
6+
@name "SafeURL"
7+
@version "0.1.0"
8+
@github "https://github.com/slab/safeurl-elixir"
9+
10+
411
def project do
512
[
6-
app: :safeurl,
7-
version: "0.1.0",
8-
elixir: "~> 1.10",
9-
start_permanent: Mix.env() == :prod,
10-
deps: deps(),
13+
# Project
14+
app: @app,
15+
version: @version,
16+
elixir: "~> 1.10",
17+
description: description(),
18+
package: package(),
19+
deps: deps(),
20+
elixirc_paths: elixirc_paths(Mix.env()),
21+
22+
# ExDoc
23+
name: @name,
24+
docs: [
25+
main: @name,
26+
source_url: @github,
27+
homepage_url: @github,
28+
canonical: "https://hexdocs.pm/#{@app}",
29+
extras: ["README.md"]
30+
]
1131
]
1232
end
1333

34+
35+
defp description do
36+
"Elixir Implementation of SafeURL, Anti-SSRF"
37+
end
38+
39+
40+
# BEAM Application
1441
def application do
1542
[env: default_configs()]
1643
end
1744

45+
1846
defp default_configs do
1947
[
2048
schemes: ~w[http https],
@@ -24,11 +52,34 @@ defmodule SafeURL.MixProject do
2452
]
2553
end
2654

55+
56+
# Dependencies
2757
defp deps do
2858
[
2959
{:httpoison, "~> 1.8"},
3060
{:inet_cidr, "~> 1.0"},
3161
{:dns, "~> 2.2"},
62+
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
63+
]
64+
end
65+
66+
67+
# Compilation Paths
68+
defp elixirc_paths(:test), do: ["lib", "test/support"]
69+
defp elixirc_paths(_), do: ["lib"]
70+
71+
72+
# Package Information
73+
defp package do
74+
[
75+
name: @app,
76+
maintainers: ["Sheharyar Naseer", "Include Security", "Jason Chen"],
77+
licenses: ["MIT"],
78+
files: ~w(mix.exs lib README.md),
79+
links: %{
80+
"Github" => @github,
81+
"Slab" => "https://slab.com/",
82+
}
3283
]
3384
end
3485
end

0 commit comments

Comments
 (0)