-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
128 lines (117 loc) · 3.09 KB
/
mix.exs
File metadata and controls
128 lines (117 loc) · 3.09 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
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
defmodule MoneyInput.MixProject do
use Mix.Project
@version "0.2.0"
@source_url "https://github.com/ex-money/money_input"
def project do
[
app: :ex_money_input,
version: @version,
name: "Money.Input",
source_url: @source_url,
elixir: "~> 1.17",
start_permanent: Mix.env() == :prod,
deps: deps(),
description: description(),
package: package(),
docs: docs(),
elixirc_paths: elixirc_paths(Mix.env()),
dialyzer: [
plt_add_apps: ~w(ecto gettext mix phoenix_html phoenix_live_view)a,
flags: [
:error_handling,
:unknown,
:underspecs,
:extra_return,
:missing_return
]
]
]
end
def application do
[
extra_applications: [:logger]
]
end
defp description do
"Locale-aware money form input — <.money_input> and <.currency_picker> Phoenix HEEx " <>
"components, an AutoNumeric-backed JS hook, and an Ecto changeset bridge."
end
defp package do
[
maintainers: ["Kip Cole"],
licenses: ["Apache-2.0"],
links: links(),
files: ~w(lib priv guides mix.exs README.md CHANGELOG.md LICENSE.md)
]
end
defp links do
%{
"GitHub" => @source_url,
"Readme" => "#{@source_url}/blob/v#{@version}/README.md",
"Changelog" => "#{@source_url}/blob/v#{@version}/CHANGELOG.md"
}
end
defp docs do
[
source_ref: "v#{@version}",
main: "readme",
extras: [
"README.md",
"CHANGELOG.md",
"LICENSE.md",
"guides/integration.md",
"guides/styling.md"
],
groups_for_extras: [
Guides: ~r/guides\/.*/
],
formatters: ["html"],
groups_for_modules: groups_for_modules(),
# External-package references that ex_doc can't follow
# because the host package isn't in this docs build.
skip_code_autolink_to: [
"Ecto.Changeset.t/0",
"Supervisor.child_spec/0",
"Localize.LanguageTag.t/0",
"Money.t/0"
],
skip_undefined_reference_warnings_on: ["CHANGELOG.md"]
]
end
defp groups_for_modules do
[
Components: ~r/^Money\.Input\.Components(\.|$)/,
"Headless API": [
Money.Input.Cast,
Money.Input.Validator,
Money.Input.Currency,
Money.Input.Changeset
],
Exceptions: [
Money.Input.NoNumberSymbolsError,
Money.Input.ValidationError
]
]
end
defp deps do
[
{:ex_money, "~> 6.0"},
{:localize, "~> 0.36"},
{:phoenix_html, "~> 4.0", optional: true},
{:phoenix_live_view, "~> 1.0", optional: true},
{:ecto, "~> 3.10", optional: true},
{:gettext, "~> 1.0"},
{:ex_doc, "~> 0.30", only: [:dev, :release], runtime: false},
{:dialyxir, "~> 1.4", only: :dev, 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
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
end