# SPDX-FileCopyrightText: None # SPDX-License-Identifier: CC0-1.0 defmodule Tablet.MixProject do use Mix.Project @version "0.3.2" @description "A tiny tabular table renderer" @source_url "https://github.com/fhunleth/tablet" def project do [ app: :tablet, version: @version, elixir: "~> 1.13", elixirc_paths: elixirc_paths(Mix.env()), description: @description, package: package(), source_url: @source_url, docs: docs(), start_permanent: Mix.env() == :prod, dialyzer: [ flags: [:missing_return, :extra_return, :unmatched_returns, :error_handling, :underspecs], plt_add_apps: [:ex_unit] ], test_coverage: [tool: ExCoveralls], deps: deps() ] end def cli do [ preferred_envs: %{ credo: :test, coveralls: :test, "coveralls.circle": :test, "coveralls.detail": :test, "coveralls.post": :test, "coveralls.html": :test, dialyzer: :test, docs: :docs, "hex.build": :docs, "hex.publish": :docs } ] end defp elixirc_paths(:test), do: ["lib", "test/support"] defp elixirc_paths(_), do: ["lib"] def application do [] end defp package do %{ files: [ "CHANGELOG.md", "assets/*.png", "gallery.md", "lib", "LICENSES", "mix.exs", "NOTICE", "README.md", "REUSE.toml", "usage-rules.md" ], licenses: ["Apache-2.0"], links: %{ "GitHub" => @source_url, "Changelog" => "#{@source_url}/blob/main/CHANGELOG.md", "REUSE Compliance" => "https://api.reuse.software/info/github.com/fhunleth/tablet" } } end defp docs do [ assets: %{"assets" => "assets"}, extras: ["README.md", "gallery.md", "CHANGELOG.md"], default_group_for_doc: fn metadata -> if group = metadata[:group] do "Functions: #{group}" end end, main: "readme", source_ref: "v#{@version}", source_url: @source_url, skip_undefined_reference_warnings_on: ["CHANGELOG.md"] ] end defp deps do [ {:excoveralls, "~> 0.18", only: :test, runtime: false}, {:ex_doc, "~> 0.27", only: :docs, runtime: false}, {:credo, "~> 1.6", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false} ] end end