Packages
phoenix_gen_api
2.12.0
2.22.0
2.21.1
2.21.0
2.20.1
2.20.0
2.19.0
2.18.1
2.18.0
2.17.1
2.17.0
2.16.0
2.15.0
2.14.0
2.13.0
2.12.0
2.11.0
2.10.0
2.9.1
2.9.0
2.8.0
2.7.0
2.6.1
2.6.0
2.5.0
2.4.0
2.3.0
2.2.0
2.1.1
2.1.0
2.0.1
2.0.0
1.2.0
1.1.3
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
0.2.1
0.2.0
0.1.1
0.1.0
0.0.16
0.0.15
0.0.14
0.0.13
0.0.12
0.0.11
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
A library for fast develop APIs in Elixir cluster, using Phoenix Channels for transport data, auto pull api configs from service nodes.
Current section
Files
Jump to
Current section
Files
phoenix_gen_api
mix.exs
mix.exs
defmodule PhoenixGenApi.MixProject do
use Mix.Project
def project do
[
app: :phoenix_gen_api,
version: "2.12.0",
elixir: "~> 1.18",
start_permanent: Mix.env() == :prod,
deps: deps(),
elixirc_paths: elixirc_paths(Mix.env()),
# Docs
name: "PhoenixGenApi",
source_url: "https://github.com/ohhi-vn/phoenix_gen_api",
homepage_url: "https://ohhi.vn",
docs: docs(),
description: description(),
package: package(),
aliases: aliases(),
usage_rules: usage_rules()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger],
mod: {PhoenixGenApi.Application, []}
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:nestru, "~> 1.0"},
{:telemetry, "~> 1.0"},
{:uniq, "~> 0.6"},
{:ex_doc, "~> 0.40", only: :dev, runtime: false},
{:benchee, "~> 1.5", only: :dev},
{:tidewave, "~> 0.5", only: [:dev]},
{:usage_rules, "~> 1.2", only: [:dev]},
# Test dependencies
{:excoveralls, "~> 0.18", 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},
]
end
defp package() do
[
maintainers: ["Manh Vu"],
licenses: ["MPL-2.0"],
links: %{
"GitHub" => "https://github.com/ohhi-vn/phoenix_gen_api",
"About us" => "https://ohhi.vn/"
}
]
end
defp description() do
"A library for fast develop APIs in Elixir cluster, using Phoenix Channels for transport data, auto pull api configs from service nodes."
end
defp docs do
[
main: "readme",
extras: extras()
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp extras do
list =
"guides/**/*.md"
|> Path.wildcard()
list = list ++ ["README.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"
no_change -> no_change
end
{String.to_atom(path),
[
title: title,
default: title == "Guide"
]}
end)
end
defp aliases do
[
precommit: ["compile --warning-as-errors", "deps.unlock --unused", "format", "test"],
tidewave:
"run --no-halt -e 'Agent.start(fn -> Bandit.start_link(plug: Tidewave, port: 4114) end)'",
"usage_rules.update": [
"""
usage_rules.sync AGENTS.md --all \
--inline usage_rules:all \
--link-to-folder deps
"""
|> String.trim()
],
# Testing & Coverage
coveralls: ["test --cover", "coveralls.html"],
# Code Quality
quality: ["format --check-formatted", "credo --strict", "dialyzer"]
]
end
defp usage_rules do
[
file: "AGENTS.md",
usage_rules: :all
]
end
end