-
-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathmix.exs
More file actions
107 lines (98 loc) · 2.91 KB
/
Copy pathmix.exs
File metadata and controls
107 lines (98 loc) · 2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# SPDX-FileCopyrightText: 2025 usage_rules contributors <https://github.com/ash-project/usage_rules/graphs/contributors>
#
# SPDX-License-Identifier: MIT
defmodule UsageRules.MixProject do
use Mix.Project
@version "1.2.6"
@description """
A config-driven dev tool for Elixir projects to manage AGENTS.md files and agent skills from dependencies
"""
@source_url "https://github.com/ash-project/usage_rules"
def project do
[
app: :usage_rules,
version: @version,
elixir: "~> 1.18",
package: package(),
aliases: aliases(),
dialyzer: [plt_add_apps: [:mix, :iex]],
docs: &docs/0,
description: @description,
source_url: @source_url,
homepage_url: @source_url,
start_permanent: Mix.env() == :prod,
consolidate_protocols: Mix.env() != :dev,
deps: deps()
]
end
defp package do
[
maintainers: [
"Zach Daniel <zach@zachdaniel.dev>"
],
licenses: ["MIT"],
files:
~w(lib .formatter.exs mix.exs README* LICENSE* CHANGELOG* usage-rules usage-rules.md),
links: %{
"GitHub" => @source_url,
"Changelog" => "#{@source_url}/blob/main/CHANGELOG.md",
"Discord" => "https://discord.gg/HTHRaaVPUc",
"Website" => "https://ash-hq.org",
"Forum" => "https://elixirforum.com/c/elixir-framework-forums/ash-framework-forum"
}
]
end
defp docs do
[
main: "readme",
source_ref: "v#{@version}",
extra_section: "GUIDES",
extras: [
{"README.md", title: "Home"},
"CHANGELOG.md"
],
before_closing_head_tag: fn type ->
if type == :html do
"""
<script>
if (location.hostname === "hexdocs.pm") {
var script = document.createElement("script");
script.src = "https://plausible.io/js/script.js";
script.setAttribute("defer", "defer")
script.setAttribute("data-domain", "ashhexdocs")
document.head.appendChild(script);
}
</script>
"""
end
end
]
end
defp aliases do
[
sobelow: "sobelow --skip",
credo: "credo --strict"
]
end
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
{:req, "~> 0.5"},
{:jason, "~> 1.0"},
# not an optional dependency, because *this package* is itself a dev dependency
{:igniter, "~> 0.6 and >= 0.6.6"},
# dev dependencies
{:ex_doc, "~> 0.37-rc", only: [:dev, :test], runtime: false},
{:ex_check, "~> 0.12", 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},
{:mix_audit, ">= 0.0.0", only: [:dev, :test], runtime: false},
{:git_ops, "~> 2.0", only: [:dev]}
]
end
end