-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
mix.exs
114 lines (104 loc) · 2.79 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
defmodule DenoEx.MixProject do
use Mix.Project
def project do
[
app: :deno_ex,
version: project_version(),
elixir: "~> 1.13",
start_permanent: Mix.env() == :prod,
deps: deps(),
docs: docs(),
compilers: Mix.compilers() ++ [:deno],
name: "DenoEx",
source_url: "https://github.com/akoutmos/deno_ex",
homepage_url: "https://hex.pm/packages/deno_ex",
description: "Run TypeScript & JavaScript files right from Elixir.",
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
"coveralls.github": :test
],
dialyzer: [
plt_add_deps: :apps_direct,
plt_add_apps: [:erlexec, :octo_fetch, :mix],
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
flags: ~w[unmatched_returns error_handling underspecs]a
],
package: package(),
deps: deps(),
docs: docs(),
aliases: aliases()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger, :ssl]
]
end
defp project_version do
"VERSION"
|> File.read!()
|> String.trim()
end
defp package do
[
name: "deno_ex",
files: ~w(lib mix.exs README.md LICENSE CHANGELOG.md VERSION),
licenses: ["MIT"],
maintainers: ["Alex Koutmos"],
links: %{
"GitHub" => "https://github.com/akoutmos/deno_ex",
"Sponsor" => "https://github.com/sponsors/akoutmos"
}
]
end
defp docs do
[
main: "readme",
source_ref: "master",
logo: "guides/images/logo.svg",
extras: [
"README.md",
"guides/examples/tesseract_ocr.livemd",
"guides/examples/web_scraper.livemd",
"VERSION"
],
groups_for_extras: [
"Example Livebooks": Path.wildcard("guides/examples/*.livemd")
]
]
end
defp deps do
[
# Production dependencies
{:octo_fetch, "~> 0.3.0"},
{:nimble_options, "~> 1.0.2"},
# Development dependencies
{:recon, "~> 2.5", only: [:dev]},
{:ex_doc, "~> 0.30.5", only: :dev},
{:excoveralls, "~> 0.17.0", only: [:test, :dev], runtime: false},
{:doctor, "~> 0.21.0", only: :dev},
{:credo, "~> 1.7.0", only: :dev},
{:dialyxir, "~> 1.3.0", only: :dev, runtime: false}
]
end
defp aliases do
[
docs: ["docs", ©_files/1]
]
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