-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
mix.exs
144 lines (134 loc) · 3.27 KB
/
mix.exs
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
defmodule AshPyro.MixProject do
@moduledoc false
use Mix.Project
@source_url "https://github.com/frankdugan3/ash_pyro"
@version "0.2.1"
@description """
Declarative UI for Ash Framework.
"""
def project do
[
app: :ash_pyro,
version: @version,
description: @description,
elixir: "~> 1.16",
start_permanent: Mix.env() == :prod,
package: package(),
deps: deps(),
docs: docs(),
test_paths: ["lib"],
name: "AshPyro",
source_url: @source_url,
elixirc_paths: ["lib"],
aliases: aliases(),
compilers: [:yecc] ++ Mix.compilers(),
dialyzer: [plt_add_apps: [:ash, :spark, :ecto, :mix]]
]
end
defp extras do
"documentation/**/*.md"
|> Path.wildcard()
|> Enum.map(fn path ->
title =
path
|> Path.basename(".md")
|> String.split(~r/[-_]/)
|> Enum.map_join(" ", &String.capitalize/1)
{String.to_atom(path),
[
title: title,
default: title == "Get Started"
]}
end)
end
defp groups_for_extras do
[
Tutorials: [
"documentation/tutorials/get-started.md",
~r'documentation/tutorials'
]
]
end
defp docs do
[
main: "about",
source_ref: "v#{@version}",
output: "doc",
source_url: @source_url,
extra_section: "GUIDES",
extras: extras(),
groups_for_extras: groups_for_extras(),
groups_for_modules: groups_for_modules(),
groups_for_functions: [
Macros: &(&1[:type] == :macro)
]
]
end
defp package do
[
name: :ash_pyro,
maintainers: ["Frank Dugan III"],
licenses: ["MIT"],
links: %{GitHub: @source_url},
files:
~w(lib documentation) ++
~w(README* CHANGELOG* LICENSE* mix.exs .formatter.exs)
]
end
defp groups_for_modules do
[
Core: [
AshPyro,
AshPyro.Helpers
],
"Ash Resource Extension": [
~r/AshPyro.Extensions.Resource/
]
]
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
[
# Code quality tooling
{:credo, ">= 0.0.0", only: :dev, runtime: false},
{:dialyxir, ">= 0.0.0", only: :dev, runtime: false},
{:doctor, ">= 0.0.0", only: :dev, runtime: false},
{:ex_check, "~> 0.15", [env: :prod, hex: "ex_check", only: :dev, runtime: false, repo: "hexpm"]},
{:faker, "~> 0.17", only: [:test, :dev]},
{:mix_audit, ">= 0.0.0", only: :dev, runtime: false},
{:styler, "~> 0.11", only: [:dev, :test], runtime: false},
# Build tooling
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:git_ops, "~> 2.6", only: :dev},
# Core dependencies
{:ash, "~> 3.0.0-rc.9"}
]
end
defp aliases do
[
build: [
"spark.formatter --extensions AshPyro.Extensions.Resource",
"format"
],
# until we hit 1.0, we will ensure no major release!
release: [
"build",
"git_ops.release --no-major"
],
publish: [
"hex.publish"
],
setup: [
"deps.get",
"compile",
"docs"
]
]
end
end