Current section
Files
Jump to
Current section
Files
mix.exs
defmodule EasyRpc.MixProject do
use Mix.Project
def project do
[
app: :easy_rpc,
version: "1.1.0",
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
deps: deps(),
# Docs
name: "EasyRpc",
source_url: "https://github.com/ohhi-vn/easy_rpc",
homepage_url: "https://ohhi.vn",
docs: docs(),
description: description(),
package: package(),
aliases: aliases()
]
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
[
{:spark, "~> 2.7"},
{:telemetry, "~> 1.4", optional: true},
# Test dependencies
{:excoveralls, "~> 0.18", only: :test},
{:lazy_html, ">= 0.1.0", only: :test},
# Code quality
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:ex_dna, "~> 1.4", only: [:dev, :test], runtime: false},
# Documentation
{:ex_doc, "~> 0.40", only: [:dev]},
{:benchee, "~> 1.5", only: [:dev]}
]
end
defp description() do
"A library for wrapping RPC calls from remote nodes, allowing them to be used like local functions. It provides a simple way to expose remote functions as local APIs."
end
defp package() do
[
maintainers: ["Manh Van Vu"],
licenses: ["MIT"],
links: %{
"GitHub" => "https://github.com/ohhi-vn/easy_rpc",
"About us" => "https://ohhi.vn/"
}
]
end
defp docs do
[
main: "readme",
extras: extras()
]
end
defp extras do
list =
"guides/**/*.md"
|> Path.wildcard()
list = list ++ ["README.md", "CHANGELOG.md", "CONTRIBUTING.md"]
list
|> Enum.map(fn path ->
title =
path
|> Path.basename(".md")
|> String.split(~r|[-_]|)
|> Enum.map_join(" ", &String.capitalize/1)
|> case do
"F A Q" -> "FAQ"
"Getting Started" -> "Getting Started"
"Migration Guide" -> "Migration Guide"
no_change -> no_change
end
{String.to_atom(path),
[
title: title,
default: title == "Getting Started"
]}
end)
end
defp aliases do
[
"lint:quick": [
"compile --warnings-as-errors",
"format --check-formatted",
"credo --only warning"
],
lint: [
"compile --warnings-as-errors",
"format --check-formatted",
"credo"
],
coveralls: ["test --cover", "coveralls.html"],
quality: ["format --check-formatted", "credo --strict"]
]
end
end