defmodule AshCommanded.MixProject do use Mix.Project @version "0.2.0" @description "CQRS pattern implementation for Ash Framework resources using Commanded" @source_url "https://github.com/accountex-org/ash_commanded" def project do [ app: :ash_commanded, version: @version, elixir: "~> 1.14", start_permanent: Mix.env() == :prod, consolidate_protocols: Mix.env() == :prod, deps: deps(), # Hex description: @description, package: package(), # Docs name: "AshCommanded", docs: docs(), # Testing aliases: aliases() ] end # Run "mix help compile.app" to learn about applications. def application do [ extra_applications: [:logger] ] end # Run "mix help deps" to learn about dependencies. defp deps do [ {:ash, "~> 3.0"}, {:sourceror, "~> 1.8", only: [:dev, :test]}, {:spark, "~> 2.3"}, {:igniter, "~> 0.5", only: [:dev, :test]}, {:mock, "~> 0.3.0", only: [:test]}, # Documentation {:ex_doc, "~> 0.30", only: [:dev, :test], runtime: false} # {:dep_from_hexpm, "~> 0.3.0"}, # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"} ] end defp package do [ maintainers: ["Accountex"], licenses: ["MIT"], links: %{ "GitHub" => @source_url }, files: ~w(lib mix.exs README.md LICENSE .formatter.exs) ] end defp docs do [ main: "readme", source_url: @source_url, source_ref: "v#{@version}", extras: [ "README.md", "LICENSE", "documentation/commands.md", "documentation/events.md", "documentation/projections.md", "documentation/event_handlers.md", "documentation/middleware.md", "documentation/parameter_handling.md", "documentation/transactions.md", "documentation/context_propagation.md", "documentation/error_handling.md", "documentation/routers.md", "documentation/application.md", "documentation/snapshotting.md", "cheatsheets/AshCommanded.Commanded.Dsl.cheatmd" ], groups_for_extras: [ Guides: [ "documentation/commands.md", "documentation/events.md", "documentation/projections.md", "documentation/event_handlers.md", "documentation/routers.md", "documentation/application.md", "documentation/snapshotting.md" ], "Advanced Features": [ "documentation/middleware.md", "documentation/parameter_handling.md", "documentation/transactions.md", "documentation/context_propagation.md", "documentation/error_handling.md" ], Cheatsheets: [ "cheatsheets/AshCommanded.Commanded.Dsl.cheatmd" ] ], groups_for_modules: [ DSL: [ AshCommanded.Commanded.Dsl, ~r/AshCommanded.Commanded.Sections/ ], Transformers: [ ~r/AshCommanded.Commanded.Transformers/ ], Verifiers: [ ~r/AshCommanded.Commanded.Verifiers/ ], Info: [ AshCommanded.Commanded.Info ] ], before_closing_body_tag: &before_closing_body_tag/1, before_closing_head_tag: &before_closing_head_tag/1, formatters: ["html"] ] end defp before_closing_head_tag(:html) do """ """ end defp before_closing_body_tag(:html) do """ """ end defp aliases do [ docs: ["docs", ©_images/1], "gen.docs": ["spark.cheat_sheets", "docs"], "spark.cheat_sheets": "spark.cheat_sheets --extensions AshCommanded.Commanded.Dsl" ] end # Copy images after docs are generated defp copy_images(_) do # Add any image copying logic here if needed :ok end end