Current section

Files

Jump to

mix.exs

defmodule SagentsLiveDebugger.MixProject do
  use Mix.Project

  @source_url "https://github.com/sagents-ai/sagents_live_debugger"
  @version "0.6.4"

  def project do
    [
      app: :sagents_live_debugger,
      version: @version,
      elixir: "~> 1.17",
      test_options: [docs: true],
      start_permanent: Mix.env() == :prod,
      aliases: aliases(),
      deps: deps(),
      package: package(),
      docs: docs(),
      name: "Sagents LiveDebugger",
      homepage_url: @source_url,
      description:
        "A Phoenix LiveView dashboard for debugging and monitoring Sagents agents in real-time."
    ]
  end

  # Run "mix help compile.app" to learn about applications.
  def application do
    [
      extra_applications: [:logger]
    ]
  end

  def cli do
    [
      preferred_envs: [precommit: :test]
    ]
  end

  # Run "mix help deps" to learn about dependencies.
  defp deps do
    [
      {:phoenix_live_view, "~> 1.0"},
      {:jason, ">= 1.4.0"},
      # {:sagents, path: "../sagents"},
      {:sagents, "~> 0.12"},
      {:horde, "~> 0.10.0", optional: true},
      # markdown and code highlighting (autumn)
      {:mdex, ">= 0.11.0"},
      {:lumis, ">= 0.1.0"},
      # Time zone database for this package's own tests; host apps configure
      # their own Calendar.TimeZoneDatabase. Reads the OS zoneinfo files under
      # /usr/share/zoneinfo, so it pulls no HTTP client of its own.
      {:zoneinfo, ">= 0.1.0", only: :test},
      # Structural assertions against rendered components
      {:lazy_html, ">= 0.1.0", only: :test},
      # Docs
      {:ex_doc, ">= 0.0.0", only: :dev, runtime: false}
    ]
  end

  # Aliases are shortcuts or tasks specific to the current project.
  # For example, before performing a commit, run the following checks:
  #
  #     $ mix precommit
  #
  # See the documentation for `Mix` for more info on aliases.
  defp aliases do
    [
      precommit: ["compile --warning-as-errors", "deps.unlock --unused", "format", "test"]
    ]
  end

  defp docs do
    [
      main: "readme",
      extras: extras()
    ]
  end

  defp extras do
    [
      "README.md",
      "CHANGELOG.md",
      "LICENSE"
    ]
  end

  defp package do
    [
      files: [
        "lib",
        "priv",
        ".formatter.exs",
        "mix.exs",
        "README*",
        "CHANGELOG*",
        "LICENSE*"
      ],
      maintainers: ["Mark Ericksen"],
      licenses: ["Apache-2.0"],
      links: %{"GitHub" => @source_url}
    ]
  end
end