-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
mix.exs
149 lines (139 loc) · 3.61 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
defmodule PyroComponents.MixProject do
@moduledoc false
use Mix.Project
@source_url "https://github.com/frankdugan3/pyro_components"
@version "0.1.1"
@description """
Ready-made Phoenix components, built with Pyro.
"""
def project do
[
app: :pyro_components,
version: @version,
description: @description,
elixir: "~> 1.16",
start_permanent: Mix.env() == :prod,
package: package(),
deps: deps(),
docs: docs(),
test_paths: ["lib"],
name: "PyroComponents",
source_url: @source_url,
elixirc_paths: ["lib"],
aliases: aliases(),
compilers: [:yecc] ++ Mix.compilers(),
dialyzer: [plt_add_apps: [: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: :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: [
PyroComponents
],
Overrides: [
~r/\.Overrides\./
],
Components: [~r/\.Components\./]
]
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
{:ecto, "~> 3.11"},
{:pyro, "~> 0.3"},
# {:pyro, github: "frankdugan3/pyro", branch: "main"},
# {:pyro, path: "../pyro"},
{:jason, "~> 1.4"},
# These dependencies add optional features if installed
{:makeup, "~> 1.1", optional: true},
{:tzdata, "~> 1.1.0", optional: true},
{:tz_extra, "~> 0.26", optional: true}
]
end
defp aliases do
[
setup: [
"deps.get",
"compile",
"docs"
],
# until we hit 1.0, we will ensure no major release!
release: [
"git_ops.release --no-major"
],
publish: [
"hex.publish"
]
]
end
end