-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
97 lines (89 loc) · 2.57 KB
/
Copy pathmix.exs
File metadata and controls
97 lines (89 loc) · 2.57 KB
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
defmodule Localize.Inputs.Playground.MixProject do
use Mix.Project
@version "0.1.0"
@source_url "https://github.com/elixir-localize/localize_inputs_playground"
def project do
[
app: :localize_inputs_playground,
version: @version,
name: "Localize.Inputs.Playground",
source_url: @source_url,
elixir: "~> 1.17",
start_permanent: Mix.env() == :prod,
deps: deps(),
description: description(),
docs: docs(),
dialyzer: [
plt_add_apps: ~w(ecto gettext mix phoenix_html phoenix_live_view plug bandit)a,
flags: [
:error_handling,
:unknown,
:underspecs,
:extra_return,
:missing_return
]
]
]
end
def application do
[
mod: {Localize.Inputs.Playground.Application, []},
extra_applications: [:logger]
]
end
defp description do
"Deployable host for `Localize.Inputs.Playground.Visualizer` — Bandit + a host " <>
"router (favicon, robots.txt, /healthz) that forwards to the visualizer."
end
defp docs do
[
source_ref: "v#{@version}",
main: "readme",
extras: ["README.md", "CHANGELOG.md", "LICENSE.md"],
formatters: ["html", "markdown"],
groups_for_modules: groups_for_modules(),
skip_code_autolink_to: [
"Plug.Conn.t/0",
"Supervisor.child_spec/0"
],
skip_undefined_reference_warnings_on: ["CHANGELOG.md"]
]
end
defp groups_for_modules do
[
Host: [
Localize.Inputs.Playground.Application,
Localize.Inputs.Playground.Router
],
Visualizer: ~r/^Localize.Inputs.Playground\.Visualizer(\.|$)/,
Gettext: [Localize.Inputs.Playground.Gettext],
Exceptions: [Localize.Inputs.Playground.VisualizerDisabledError]
]
end
defp deps do
[
{:localize, "~> 1.0"},
{:calendrical, "~> 1.0"},
{:localize_inputs_core, "~> 0.2"},
{:localize_number_inputs, "~> 0.2"},
{:localize_datetime_inputs, "~> 0.2"},
{:ex_money_input, "~> 0.3"},
{:localize_web, "~> 1.0"},
{:phoenix_html, "~> 4.0"},
{:phoenix_live_view, "~> 1.0"},
{:gettext, "~> 1.0"},
{:plug, "~> 1.15"},
{:bandit, "~> 1.5"},
{:ex_doc, "~> 0.30", only: [:dev, :release], runtime: false},
{:dialyxir, "~> 1.4", only: :dev, runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false}
] ++ maybe_json_polyfill()
end
defp maybe_json_polyfill do
if Code.ensure_loaded?(:json) do
[]
else
[{:json_polyfill, "~> 0.2 or ~> 1.0"}]
end
end
end