-
Notifications
You must be signed in to change notification settings - Fork 1
/
mix.exs
116 lines (105 loc) · 2.9 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
109
110
111
112
113
114
115
116
defmodule UnchartedPhoenix.MixProject do
use Mix.Project
@github_organization "unchartedelixir"
@app :uncharted_phoenix
@source_url "https://github.com/#{@github_organization}/#{@app}"
@version Path.join(__DIR__, "VERSION")
|> File.read!()
|> String.trim()
def project do
[
app: @app,
version: @version,
description: description(),
package: package(),
docs: docs(),
elixir: "~> 1.7",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix] ++ Mix.compilers(),
dialyzer: [
plt_add_apps: ~w(ex_unit mix)a,
plt_add_deps: :app_tree,
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
ignore_warnings: "../.dialyzer-ignore.exs"
],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
credo: :test,
dialyzer: :test,
docs: :docs,
"hex.build": :docs,
"hex.publish": :docs
],
test_coverage: [tool: ExCoveralls],
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps()
]
end
# Configuration for the OTP application.
#
# Type `mix help compile.app` for more information.
def application do
[
extra_applications: [:logger]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Specifies your project dependencies.
#
# Type `mix help deps` for examples and options.
defp deps do
[
{:credo, "~> 1.5", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.1", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.22", only: :docs, runtime: false},
{:excoveralls, "~> 0.14", only: :test},
{:jason, "~> 1.2"},
{:uncharted, path: "../uncharted"},
{:phoenix_live_view, "~> 0.15"}
]
end
# Aliases are shortcuts or tasks specific to the current project.
# For example, to install project dependencies and perform other setup tasks, run:
#
# $ mix setup
#
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
docs: ["docs", ©_assets/1]
]
end
defp description do
"""
A LiveView Component charting package based on uncharted.
"""
end
defp docs do
[
extras: ["README.md", "CHANGELOG.md", "docs/Accessibility.md"],
main: "readme",
source_ref: "v#{@version}",
source_url: @source_url,
skip_undefined_reference_warnings_on: ["CHANGELOG.md"]
]
end
defp package do
[
files: package_files(),
licenses: ["MIT"],
links: %{"GitHub" => @source_url}
]
end
defp package_files do
~w(lib .formatter.exs mix.exs README.md LICENSE CHANGELOG.md VERSION)
end
defp copy_assets(_) do
File.cp_r("assets", "doc/assets")
end
end