defmodule Ply.MixProject do use Mix.Project @version "0.1.0" @source_url "https://github.com/mdon/ply" def project do [ app: :ply, version: @version, elixir: "~> 1.18", elixirc_paths: elixirc_paths(Mix.env()), start_permanent: Mix.env() == :prod, deps: deps(), aliases: aliases(), # Hex description: "Reader and writer for the PLY (Stanford Polygon) 3D format — ASCII and binary, " <> "with lazy streaming for large files. Pure Elixir, no NIFs, no dependencies.", package: package(), # Dialyzer dialyzer: [ignore_warnings: ".dialyzer_ignore.exs"], # Test coverage — production code only. test_coverage: [ ignore_modules: [ ~r/^Ply\.Test\./, Ply.Fixtures ] ], # Docs name: "Ply", source_url: @source_url, docs: docs() ] end def application do [ extra_applications: [:logger] ] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] defp aliases do [ quality: ["format", "credo --strict", "dialyzer"], "quality.ci": ["format --check-formatted", "credo --strict", "dialyzer"], precommit: [ "compile --force --warnings-as-errors", "deps.unlock --check-unused", # Run via `cmd` so Hex bootstraps in a fresh process — the hex.* archive # tasks aren't resolvable via Mix.Task.run inside an alias. "cmd mix hex.audit", "quality.ci", # Also via `cmd`: `mix test` inside an alias would inherit the dev # environment and refuse to run. "cmd mix test" ] ] end # Deliberately zero runtime dependencies. PLY parsing is binary pattern # matching and integer arithmetic; anything we'd pull in would be a # liability for consumers, not a convenience. defp deps do [ {:ex_doc, "~> 0.34", only: :dev, runtime: false}, {:credo, "~> 1.7", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false} ] end defp package do [ licenses: ["MIT"], links: %{"GitHub" => @source_url}, files: ~w(lib .formatter.exs mix.exs README.md CHANGELOG.md LICENSE) ] end defp docs do [ main: "Ply", source_ref: "v#{@version}", extras: ["README.md", "CHANGELOG.md"] ] end end