-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathmix.exs
108 lines (101 loc) · 3.46 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
defmodule PrimerLive.MixProject do
use Mix.Project
def project do
[
app: :primer_live,
version: "0.3.1",
homepage_url: "https://github.com/ArthurClemens/primer_live",
description: description(),
package: package(),
aliases: aliases(),
name: "PrimerLive",
deps: deps(),
docs: docs()
]
end
defp description() do
"A collection of function components that implements GitHub's Primer Design System."
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
[
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:ecto_sql, "~> 3.9"},
{:esbuild, "~> 0.7", only: :dev},
{:ex_doc, "~> 0.29", only: :dev},
{:phoenix_html, "~> 3.3"},
{:phoenix_live_view, ">= 0.18.3"},
{:jason, "~> 1.4"}
]
end
defp docs do
[
main: "PrimerLive",
groups_for_functions: [
Alerts: &(&1[:section] == :alerts),
Avatars: &(&1[:section] == :avatars),
Blankslate: &(&1[:section] == :blankslate),
Box: &(&1[:section] == :box),
"Branch name": &(&1[:section] == :branch_name),
Breadcrumbs: &(&1[:section] == :breadcrumbs),
Buttons: &(&1[:section] == :buttons),
Dialog: &(&1[:section] == :dialog),
Drawer: &(&1[:section] == :drawer),
"Styled HTML": &(&1[:section] == :styled_html),
Forms: &(&1[:section] == :forms),
Header: &(&1[:section] == :header),
Icons: &(&1[:section] == :icons),
Labels: &(&1[:section] == :labels),
Layout: &(&1[:section] == :layout),
Links: &(&1[:section] == :links),
Loaders: &(&1[:section] == :loaders),
Markdown: &(&1[:section] == :markdown),
Menus: &(&1[:section] == :menus),
Navigation: &(&1[:section] == :navigation),
Pagination: &(&1[:section] == :pagination),
Popover: &(&1[:section] == :popover),
Progress: &(&1[:section] == :progress),
Subhead: &(&1[:section] == :subhead),
Theme: &(&1[:section] == :theme),
Timeline: &(&1[:section] == :timeline),
Toasts: &(&1[:section] == :toasts),
Tooltips: &(&1[:section] == :tooltips),
Truncate: &(&1[:section] == :truncate)
],
extras: [
"LICENSE.md"
]
]
end
defp package do
[
maintainers: ["Arthur Clemens"],
licenses: ["MIT"],
links: %{
GitHub: "https://github.com/ArthurClemens/primer_live"
},
files:
~w(lib .formatter.exs mix.exs README* LICENSE* priv/octicon_builder/build.exs priv/static
CHANGELOG* package.json)
]
end
defp aliases do
[
setup: ["deps.get", "cmd --cd assets npm install"],
"assets.build": [
"cmd npm --prefix assets run build:clear -- ../priv/static/*",
"cmd npm --prefix assets run build -- --format=esm --sourcemap --outfile=../priv/static/primer-live.esm.js",
"cmd npm --prefix assets run build -- --format=cjs --sourcemap --outfile=../priv/static/primer-live.cjs.js",
"cmd npm --prefix assets run build -- --format=iife --target=es2016 --outfile=../priv/static/primer-live.js",
"cmd npm --prefix assets run build -- --format=iife --target=es2016 --minify --outfile=../priv/static/primer-live.min.js",
"cmd npm --prefix assets run build:types"
]
]
end
end