Hex
hex is the package manager and repository for Elixir (and Erlang) libraries and packages.
Login
mix hex.user register
or
mix hex.user auth
Create a new package
mix new my_pkg
mix.exs
defmodule MyPkg.MixProject do
use Mix.Project
def project do
[
name: "MyPkg",
app: :my_pkg,
version: "0.1.0",
elixir: "~> 1.14",
start_permanent: Mix.env() == :prod,
description: description(),
package: package(),
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:ex_doc, "~> 0.29", only: :dev, runtime: false},
]
end
defp description() do
"""
A Elixir library that ...
"""
end
defp package() do
[
licenses: ["MIT"],
links: %{
"GitHub" => "https://github.com/foo/mypkg"
}
]
end
end
Publish
mix hex.build
mix hex.publish