Current section

Files

Jump to
filtr mix.exs
Raw

mix.exs

defmodule Filtr.MixProject do
use Mix.Project
@source "https://github.com/Blatts12/filtr"
@version "0.1.4"
def project do
[
app: :filtr,
description: "Parameter validation library for Elixir with Phoenix integration",
package: package(),
docs: docs(),
version: @version,
elixir: "~> 1.13",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.html": :test,
"coveralls.detail": :test
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications:
case Mix.env() do
:test -> [:logger, :plug, :phoenix_live_view]
:dev -> [:logger, :plug, :phoenix_live_view]
_ -> [:logger]
end
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:phoenix, "#{phoenix_version()}", optional: true},
{:phoenix_live_view, "#{live_view_version()}", optional: true},
{:ex_doc, "~> 0.31", only: :dev, runtime: false},
{:dialyxir, "~> 1.4", only: [:dev], runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:styler, "~> 1.9", only: [:dev, :test], runtime: false},
{:floki, ">= 0.30.0", only: :test},
{:lazy_html, ">= 0.1.0", only: :test},
{:excoveralls, "~> 0.18", only: :test}
]
end
defp live_view_version, do: System.get_env("LIVE_VIEW_VERSION", ">= 0.20.0")
defp phoenix_version, do: System.get_env("PHOENIX_VERSION", ">= 1.6.0")
defp package do
[
licenses: ["MIT"],
links: %{"GitHub" => @source}
]
end
defp docs do
[
main: "readme",
source_url: @source,
extras: ["README.md"],
source_ref: @version
]
end
end