-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
150 lines (140 loc) · 3.99 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
145
146
147
148
149
150
defmodule AshPyroComponents.MixProject do
@moduledoc false
use Mix.Project
@source_url "https://github.com/frankdugan3/ash_pyro_components"
@version "0.1.0"
@description """
Automatically render UI for Ash resources via DSL configuration.
"""
def project do
[
app: :ash_pyro_components,
version: @version,
description: @description,
elixir: "~> 1.16",
start_permanent: Mix.env() == :prod,
package: package(),
deps: deps(),
docs: docs(),
test_paths: ["lib"],
name: "AshPyroComponents",
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: [
Components: &(&1[:type] == :component),
Macros: &(&1[:type] == :macro)
]
]
end
defp package do
[
name: :ash_pyro_components,
maintainers: ["Frank Dugan III"],
licenses: ["MIT"],
links: %{GitHub: @source_url},
files:
~w(assets lib documentation) ++
~w(README* CHANGELOG* LICENSE* mix.exs package.json .formatter.exs)
]
end
defp groups_for_modules do
[
Core: [
AshPyroComponents
],
Overrides: [
AshPyroComponents.Overrides,
~r/\.Overrides\./
],
Components: [~r/\.Components\./],
"Component Tooling": [
AshPyroComponents.Component,
AshPyroComponents.LiveComponent,
AshPyroComponents.LiveView
],
Types: [~r/\.Type\./]
]
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]},
{:floki, ">= 0.30.0", only: :test},
{: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
{:pyro, "~> 0.3"},
# {:ash_pyro, "~> 0.2"},
# {:pyro_components, "~> 0.1"},
# {:pyro_components, github: "frankdugan3/pyro_components", branch: "main"},
# {:ash_pyro, github: "frankdugan3/ash_pyro", branch: "main"},
{:pyro_components, path: "../pyro_components"},
{:ash_pyro, path: "../ash_pyro"},
{:phoenix_live_view, "~> 0.20"},
{:phoenix, "~> 1.7"},
{:ash, "~> 3.0.0-rc.8"},
{:ash_phoenix, "~> 2.0.0-rc.2"},
{:gettext, "~> 0.24", optional: true}
]
end
defp aliases do
[
setup: ["deps.get", "compile", "docs"],
build: ["format", "compile", "docs"],
# until we hit 1.0, we will ensure no major release!
release: ["git_ops.release --no-major"],
publish: ["hex.publish"]
]
end
end