-
Notifications
You must be signed in to change notification settings - Fork 3
/
mix.exs
94 lines (85 loc) · 2.24 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
defmodule Flashy.MixProject do
@moduledoc false
use Mix.Project
@app :flashy
@name "Flashy"
@description "Flashy is a small library that extends LiveView's flash support to function and live components"
@version "0.2.7"
@github "https://github.com/sezaru/#{@app}"
@author "Eduardo Barreto Alexandre"
@license "MIT"
def project do
[
app: @app,
version: @version,
elixir: "~> 1.15",
name: @name,
description: @description,
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs(),
package: package(),
aliases: aliases(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: preferred_cli_env()
]
end
def application, do: [extra_applications: [:logger]]
defp deps do
[
{:phoenix_live_view, "~> 0.20"},
{:esbuild, "~> 0.7", runtime: Mix.env() == :dev},
{:tailwind, "~> 0.2.0", runtime: Mix.env() == :dev},
{:typedstruct, "~> 0.5.0", runtime: false},
{:phx_component_helpers, "~> 1.3"},
{:ex_doc, ">= 0.0.0", only: :dev, runtime: false},
{:excoveralls, "~> 0.16", only: [:dev, :test], runtime: false}
]
end
defp docs do
[
main: "readme",
source_ref: "v#{@version}",
source_url: @github,
extras: [
"README.md"
]
]
end
defp package do
[
name: @app,
maintainers: [@author],
licenses: [@license],
links: %{"Github" => @github},
files: ~w(mix.exs lib/flashy** package.json priv/static/flashy.min.js)
]
end
defp aliases do
[
setup: ["deps.get", "assets.setup", "assets.build", "assets.package"],
"assets.get": ["cmd --cd assets npm install"],
"assets.setup": [
"assets.get",
"tailwind.install --if-missing",
"esbuild.install --if-missing"
],
"assets.build": ["tailwind default", "esbuild default"],
"assets.package": ["esbuild package"],
"assets.deploy": [
"assets.get",
"tailwind default --minify",
"esbuild default --minify",
"phx.digest"
]
]
end
defp preferred_cli_env do
[
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
]
end
end