smokestack/mix.exs

121 lines
3.2 KiB
Elixir
Raw Normal View History

2023-08-09 20:18:46 +12:00
defmodule Smokestack.MixProject do
use Mix.Project
2024-03-30 17:58:33 +13:00
@version "0.6.1-rc.0"
2023-08-09 20:18:46 +12:00
@moduledoc """
Test factories for Ash resources.
"""
def project do
[
app: :smokestack,
version: @version,
elixir: "~> 1.15",
start_permanent: Mix.env() == :prod,
2023-08-10 21:01:45 +12:00
consolidate_protocols: Mix.env() != :test,
elixirc_paths: elixirc_paths(Mix.env()),
2023-08-09 20:18:46 +12:00
deps: deps(),
description: @moduledoc,
package: package(),
2024-02-05 15:28:53 +13:00
source_url: "https://harton.dev/james/smokestack",
homepage_url: "https://harton.dev/james/smokestack",
2023-08-10 21:01:45 +12:00
aliases: aliases(),
dialyzer: [plt_add_apps: [:faker]],
docs: [
2024-03-06 20:16:20 +13:00
main: "readme",
extra_section: "GUIDES",
formatters: ["html"],
filter_modules: ~r/^Elixir.Smokestack/,
source_url_pattern:
2024-02-05 15:28:53 +13:00
"https://harton.dev/james/smokestack/src/branch/main/%{path}#L%{line}",
spark: [
extensions: [
%{
module: Smokestack.Dsl,
name: "Smokestack.Dsl",
target: "Smokestack",
type: "Smokestack"
}
]
],
extras:
2024-03-06 20:16:20 +13:00
Enum.concat(
["README.md", "CHANGELOG.md"],
Path.wildcard("documentation/**/*.{md,livemd,cheatmd}")
),
groups_for_extras:
"documentation/*"
|> Path.wildcard()
|> Enum.map(fn dir ->
name =
dir
|> Path.split()
|> List.last()
|> String.split(~r/_+/)
|> Enum.map_join(" ", &String.capitalize/1)
files =
dir
|> Path.join("**.{md,livemd,cheatmd}")
|> Path.wildcard()
{name, files}
end)
]
2023-08-09 20:18:46 +12:00
]
end
def package do
[
name: :smokestack,
files: ~w[lib .formatter.exs mix.exs README* LICENSE* CHANGELOG* documentation],
2023-08-09 20:18:46 +12:00
maintainers: ["James Harton <james@harton.nz>"],
licenses: ["HL3-FULL"],
links: %{
2024-02-05 15:28:53 +13:00
"Source" => "https://harton.dev/james/smokestack",
2024-03-06 20:16:20 +13:00
"Github Mirror" => "https://github.com/jimsynz/smokestack",
"Changelog" => "https://docs.harton.nz/james/smokestack/changelog.html",
"Sponsor" => "https://github.com/sponsors/jimsynz"
},
2024-02-05 15:28:53 +13:00
source_url: "https://harton.dev/james/smokestack"
2023-08-09 20:18:46 +12:00
]
end
def application do
[
extra_applications: [:logger],
mod: {Smokestack.Application, []}
]
end
defp deps do
opts = [only: ~w[dev test]a, runtime: false]
[
{:ash, "== 3.0.0-rc.5"},
2023-08-09 20:18:46 +12:00
{:credo, "~> 1.7", opts},
{:dialyxir, "~> 1.3", opts},
{:doctor, "~> 0.21", opts},
{:earmark, ">= 0.0.0", opts},
{:ex_check, "~> 0.16", opts},
2023-08-09 20:18:46 +12:00
{:ex_doc, ">= 0.0.0", opts},
{:faker, "~> 0.18", opts},
2023-08-09 20:18:46 +12:00
{:git_ops, "~> 2.6", opts},
{:mix_audit, "~> 2.1", opts},
{:recase, "~> 0.7"},
2024-03-28 10:04:54 +13:00
{:spark, "~> 2.1"}
2023-08-09 20:18:46 +12:00
]
end
defp aliases do
[
"spark.formatter": "spark.formatter --extensions=Smokestack.Dsl",
"spark.cheat_sheets": "spark.cheat_sheets --extensions=Smokestack.Dsl"
2023-08-09 20:18:46 +12:00
]
end
2023-08-10 21:01:45 +12:00
defp elixirc_paths(env) when env in ~w[dev test]a, do: ~w[lib test/support]
defp elixirc_paths(_), do: ~w[lib]
2023-08-09 20:18:46 +12:00
end