-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
mix.exs
81 lines (72 loc) · 1.87 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
defmodule Temple.MixProject do
use Mix.Project
def project do
[
app: :temple,
name: "Temple",
description: "An HTML DSL for Elixir",
version: "0.14.0",
package: package(),
elixirc_paths: elixirc_paths(Mix.env()),
elixir: "~> 1.13",
start_permanent: Mix.env() == :prod,
deps: deps(),
source_url: "https://github.com/mhanberg/temple",
docs: docs()
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test) do
# hack to get the right compiler options used on the non-script files in
# test/support
Code.put_compiler_option(
:parser_options,
Keyword.put(Code.get_compiler_option(:parser_options), :token_metadata, true)
)
["lib", "test/support"]
end
defp elixirc_paths(_), do: ["lib"]
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
defp docs() do
[
main: "Temple",
extras: [
"README.md",
"guides/getting-started.md",
"guides/your-first-template.md",
"guides/components.md",
"guides/converting-html.md",
"guides/migrating/0.8-to-0.9.md",
"guides/migrating/0.10-to-0.11.md"
],
groups_for_extras: groups_for_extras()
]
end
defp groups_for_extras do
[
Guides: ~r/guides\/[^\/]+\.md/,
Migrating: ~r/guides\/migrating\/.?/
]
end
defp package do
[
maintainers: ["Mitchell Hanberg"],
licenses: ["MIT"],
links: %{github: "https://github.com/mhanberg/temple"},
files: ~w(lib CHANGELOG.md LICENSE mix.exs README.md .formatter.exs)
]
end
defp deps do
[
{:floki, ">= 0.0.0"},
{:phoenix_html, "~> 3.2 or ~> 4.0"},
{:typed_struct, "~> 0.3"},
{:ex_doc, "~> 0.35.1", only: :dev, runtime: false}
]
end
end