This repository was archived by the owner on Nov 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
89 lines (70 loc) · 2 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
defmodule Tiled.Mixfile do
use Mix.Project
@name Tiled
@version "0.1.0"
@description "Tiled Map Editor parser"
@repo_url "https://github.com/seivan/#{@name}"
# Run "mix help deps" to learn about dependencies.
@deps [
{:poison, "~> 3.1"},
]
@dev_deps [
{:stream_data, " >= 0.1.0"},
]
@no_runtime_deps [
{:dialyxir, "~> 0.5.1"},
{:ex_doc, "~> 0.15"},
{:mix_test_watch, "~> 0.3.3"},
{:fs, github: "synrc/fs", manager: :rebar, override: true},
]
@package [
maintainers: ["Seivan Heidari"],
licenses: ["MIT"],
links: %{"GitHub" => @repo_url}
]
defp deps do
dev = [only: [:dev, :test]]
no_runtime = dev ++ [runtime: false]
update_options = fn dev_options ->
fn
{name, version, options} when is_list(options) -> {name, version, dev_options |> Keyword.merge(options)}
{name, options} when is_list(options) -> {name, dev_options |> Keyword.merge(options)}
{name, version} when is_binary(version) -> {name, version, dev_options}
end
end
@deps
++ (@dev_deps |> Enum.map(update_options.(dev)))
++ (@no_runtime_deps |> Enum.map(update_options.(no_runtime)))
end
def project do
in_production = Mix.env() == :prod
[
app: @name |> Macro.underscore() |> String.to_atom(),
version: @version,
elixir: "~> 1.6",
start_permanent: in_production,
build_embedded: true,
deps: deps(),
elixirc_paths: elixirc_paths(Mix.env),
# Hex
package: @package,
description: @description,
# Docs
name: @name,
docs: [
main: @name,
source_ref: "#{@version}",
source_url: @repo_url,
homepage_url: @repo_url,
extras: ["README.md"]
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[extra_applications: [:logger]]
end
defp elixirc_paths(_ \\ nil)
defp elixirc_paths(:test), do: elixirc_paths() ++ ["test/helpers"]
defp elixirc_paths(_), do: ["lib"]
end