ash_admin/mix.exs

146 lines
4.5 KiB
Elixir
Raw Normal View History

2020-11-26 10:17:04 +13:00
defmodule AshAdmin.MixProject do
use Mix.Project
@description """
A super-admin UI for Ash Framework, built with Phoenix LiveView.
"""
2024-05-22 15:42:32 +12:00
@version "0.11.0"
2020-11-26 10:17:04 +13:00
def project do
[
app: :ash_admin,
version: @version,
description: @description,
2020-11-26 10:17:04 +13:00
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
docs: docs(),
dialyzer: [
plt_add_apps: [:ex_unit]
],
package: package(),
source_url: "https://github.com/ash-project/ash_admin",
homepage_url: "https://github.com/ash-project/ash_admin",
2020-12-04 16:19:28 +13:00
deps: deps(),
2021-03-16 15:25:03 +13:00
elixirc_paths: elixirc_paths(Mix.env()),
2020-12-08 19:22:24 +13:00
aliases: aliases()
]
end
2022-05-26 04:17:52 +12:00
defp elixirc_paths(:dev) do
2021-03-16 15:25:03 +13:00
["lib", "dev"]
end
2022-05-26 04:17:52 +12:00
defp elixirc_paths(:test) do
["test/support", "lib", "dev"]
2022-05-26 04:17:52 +12:00
end
2021-03-16 15:25:03 +13:00
defp elixirc_paths(:prod) do
["lib"]
end
def package do
[
name: :ash_admin,
licenses: ["MIT"],
links: %{
GitHub: "https://github.com/ash-project/ash_admin"
}
]
end
defp docs do
[
main: "readme",
source_ref: "v#{@version}",
logo: "logos/small-logo.png",
2024-01-13 10:38:41 +13:00
extras: [
"README.md",
"documentation/tutorials/getting-started-with-ash-admin.md",
"documentation/tutorials/contributing-to-ash-admin.md",
2024-03-30 02:48:44 +13:00
"documentation/dsls/DSL:-AshAdmin.Domain.md",
2024-05-09 11:06:55 +12:00
"documentation/dsls/DSL:-AshAdmin.Resource.md",
"CHANGELOG.md"
2024-01-13 10:38:41 +13:00
],
groups_for_extras: [
Tutorials: ~r'documentation/tutorials',
"How To": ~r'documentation/how_to',
Topics: ~r'documentation/topics',
2024-05-09 11:10:14 +12:00
DSLs: ~r'documentation/dsls',
"About AshAdmin": [
"CHANGELOG.md"
]
2024-01-13 10:38:41 +13:00
]
2024-01-03 11:23:54 +13:00
]
end
2020-12-08 19:22:24 +13:00
defp aliases() do
[
generate_migrations:
2024-03-30 02:48:44 +13:00
"ash_postgres.generate_migrations --domains Demo.Accounts.Domain,Demo.Tickets.Domain --snapshot-path dev/resource_snapshots --migration-path dev --drop-columns",
2023-02-01 18:20:23 +13:00
credo: "credo --strict",
migrate: "ash_postgres.migrate --migrations-path dev/repo/migrations",
migrate_tenants: "ash_postgres.migrate --migrations-path dev/repo/tenant_migrations",
seed: "run dev/repo/seeds.exs --truncate",
setup: ["deps.get", "assets.setup", "assets.build"],
dev: "run --no-halt dev.exs --config config",
sobelow: "sobelow --ignore XSS.Raw",
2023-11-16 09:30:13 +13:00
docs: [
"spark.cheat_sheets",
"docs",
"spark.replace_doc_links",
"spark.cheat_sheets_in_search"
],
test: ["setup", "test"],
2024-03-30 02:48:44 +13:00
"spark.formatter": "spark.formatter --extensions AshAdmin.Domain,AshAdmin.Resource",
"assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
"assets.build": ["tailwind default", "esbuild default"],
2023-11-16 09:30:13 +13:00
"assets.deploy": ["tailwind default --minify", "esbuild default --minify", "phx.digest"],
"spark.cheat_sheets_in_search":
2024-03-30 02:48:44 +13:00
"spark.cheat_sheets_in_search --extensions AshAdmin.Domain,AshAdmin.Resource",
"spark.cheat_sheets": "spark.cheat_sheets --extensions AshAdmin.Domain,AshAdmin.Resource"
2020-11-26 10:17:04 +13:00
]
end
if Mix.env() == :text do
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger],
mod: {AshAdmin, []}
]
end
2020-11-26 10:17:04 +13:00
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
2024-05-11 10:33:32 +12:00
{:ash, "~> 3.0"},
2024-05-23 01:48:26 +12:00
# {:ash_phoenix, "~> 2.0 and >= 2.0.1"},
{:ash_phoenix, path: "../ash_phoenix"},
2022-11-30 08:35:48 +13:00
{:phoenix_view, "~> 2.0"},
{:phoenix, "~> 1.7"},
2023-07-26 14:16:30 +12:00
{:phoenix_live_view, "~> 0.19"},
{:phoenix_html, "~> 4.0"},
2020-12-08 19:22:24 +13:00
{:jason, "~> 1.0"},
2023-08-01 14:47:12 +12:00
{:tails, "~> 0.1"},
{:gettext, "~> 0.20"},
2020-12-08 19:22:24 +13:00
# Dev dependencies
2024-03-30 02:48:44 +13:00
{:simple_sat, "~> 0.1", only: [:dev, :test]},
{:esbuild, "~> 0.7", only: [:dev, :test]},
{:tailwind, "~> 0.2.0", only: [:dev, :test]},
2021-03-16 16:16:28 +13:00
{:plug_cowboy, "~> 2.0", only: [:dev, :test]},
{:phoenix_live_reload, "~> 1.2", only: [:dev, :test]},
2024-05-11 10:33:32 +12:00
{:ash_postgres, "~> 2.0", only: [:dev, :test]},
{:git_ops, "~> 2.4", only: [:dev, :test]},
{:ex_doc, "~> 0.23", only: [:dev, :test], runtime: false},
{:ex_check, "~> 0.14", only: [:dev, :test]},
{:credo, ">= 0.0.0", only: [:dev, :test], runtime: false},
{:dialyxir, ">= 0.0.0", only: [:dev, :test], runtime: false},
{:sobelow, ">= 0.0.0", only: [:dev, :test], runtime: false},
2024-04-24 06:11:03 +12:00
{:floki, ">= 0.30.0", only: [:dev, :test]},
{:mix_audit, ">= 0.0.0", only: [:dev, :test], runtime: false}
2020-11-26 10:17:04 +13:00
]
end
end