forked from BeaconCMS/beacon_live_admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
78 lines (71 loc) · 2.01 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
defmodule Beacon.LiveAdmin.MixProject do
use Mix.Project
def project do
[
app: :beacon_live_admin,
version: "0.1.0-dev",
elixir: "~> 1.13",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
dialyzer: [
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
plt_add_apps: [:mix],
list_unused_filters: true
]
]
end
def application do
[
mod: {Beacon.LiveAdmin.Application, []},
extra_applications: [:logger, :runtime_tools]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
beacon_dep(),
live_monaco_editor_dep(),
{:phoenix, "~> 1.7"},
{:phoenix_html, "~> 3.3"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:phoenix_live_view, "~> 0.19"},
{:floki, ">= 0.30.0", only: :test},
{:esbuild, "~> 0.5", only: :dev},
{:tailwind, "~> 0.2"},
{:gettext, "~> 0.20"},
{:jason, "~> 1.0"},
{:plug_cowboy, "~> 2.5"},
{:dialyxir, "~> 1.2", only: :dev, runtime: false}
]
end
defp beacon_dep do
if path = System.get_env("BEACON_PATH") do
{:beacon, path: path, runtime: false}
else
{:beacon, github: "beaconCMS/beacon", runtime: false}
end
end
defp live_monaco_editor_dep do
if path = System.get_env("LIVE_MONACO_EDITOR_PATH") do
{:live_monaco_editor, path: path}
else
{:live_monaco_editor, "~> 0.1"}
end
end
defp aliases do
[
setup: ["deps.get", "assets.setup", "assets.build"],
dev: "run --no-halt dev.exs",
"assets.setup": [
"cmd npm install --prefix assets",
"tailwind.install --if-missing --no-assets",
"esbuild.install --if-missing"
],
"assets.build": ["tailwind default", "esbuild cdn", "esbuild cdn_min"],
"assets.deploy": ["tailwind default --minify", "esbuild default --minify", "phx.digest"]
]
end
end