-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathmix.exs
63 lines (55 loc) · 1.38 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
defmodule Toml.MixProject do
use Mix.Project
def project do
[
app: :toml,
version: "0.1.0",
elixir: "~> 1.6",
start_permanent: Mix.env() == :prod,
description: "An implementation of TOML for Elixir projects",
package: package(),
deps: deps(),
aliases: aliases(Mix.env),
elixirc_paths: elixirc_paths(Mix.env),
escript: escript(Mix.env)
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[{:jason, "~> 1.0", only: [:test]}]
end
defp package do
[files: ["lib", "mix.exs", "README.md", "LICENSE"],
maintainers: ["Paul Schoenfelder"],
licenses: ["Apache 2.0"],
links: %{"GitHub" => "https://github.com/bitwalker/toml-elixir"}]
end
defp escript(:test) do
[
main_module: Toml.CLI,
name: :toml,
path: Path.join([__DIR__, "bin", "toml"])
]
end
defp escript(_), do: nil
defp aliases(_env) do
[
"test-all": ["test", "toml.tests"],
clean: ["clean", &clean/1]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp clean(_args) do
toml = Path.join([__DIR__, "bin", "toml"])
if File.exists?(toml) do
_ = File.rm(toml)
end
end
end