-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
mix.exs
105 lines (94 loc) · 2.59 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
defmodule MjmlEEx.MixProject do
use Mix.Project
def project do
[
app: :mjml_eex,
version: project_version(),
elixir: ">= 1.15.0",
elixirc_paths: elixirc_paths(Mix.env()),
name: "MJML EEx",
source_url: "https://github.com/akoutmos/mjml_eex",
homepage_url: "https://hex.pm/packages/mjml_eex",
description: "Create emails that WOW your customers using MJML and EEx",
start_permanent: Mix.env() == :prod,
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
"coveralls.github": :test
],
package: package(),
deps: deps(),
docs: docs(),
aliases: aliases()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/test_components", "test/test_layouts"]
defp elixirc_paths(_), do: ["lib"]
defp package do
[
name: "mjml_eex",
files: ~w(lib mix.exs README.md LICENSE CHANGELOG.md VERSION),
licenses: ["MIT"],
maintainers: ["Alex Koutmos"],
links: %{
"GitHub" => "https://github.com/akoutmos/mjml_eex",
"Sponsor" => "https://github.com/sponsors/akoutmos"
}
]
end
defp docs do
[
main: "readme",
source_ref: "master",
logo: "guides/images/logo.svg",
extras: ["README.md"]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# Production deps
{:mjml, "~> 4.0"},
{:phoenix_html, "~> 3.2 or ~> 4.0"},
{:telemetry, "~> 1.0"},
{:erlexec, "~> 2.0.7", optional: true},
# Development deps
{:gettext, "~> 0.24.0", only: :test},
{:ex_doc, "~> 0.34", only: :dev},
{:excoveralls, "~> 0.18", only: [:test, :dev], runtime: false},
{:doctor, "~> 0.21", only: :dev},
{:credo, "~> 1.7", only: :dev},
{:git_hooks, "~> 0.7", only: [:test, :dev], runtime: false}
]
end
defp aliases do
[
docs: ["docs", ©_files/1]
]
end
defp project_version do
"VERSION"
|> File.read!()
|> String.trim()
end
defp copy_files(_) do
# Set up directory structure
File.mkdir_p!("./doc/guides/images")
# Copy over image files
"./guides/images/"
|> File.ls!()
|> Enum.each(fn image_file ->
File.cp!("./guides/images/#{image_file}", "./doc/guides/images/#{image_file}")
end)
end
end