-
Notifications
You must be signed in to change notification settings - Fork 0
/
mix.exs
92 lines (82 loc) · 2.26 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
defmodule Integrator.MixProject do
@moduledoc false
use Mix.Project
@source_url "https://github.com/woodward/integrator"
@version "0.1.3"
def project do
[
app: :integrator,
version: @version,
elixir: "~> 1.14",
start_permanent: Mix.env() == :prod,
deps: deps(),
#
# Hex
description: "Numerical integration in Elixir",
package: package(),
elixirc_paths: elixirc_paths(Mix.env()),
#
# Docs
name: "Integrator",
docs: docs(),
aliases: aliases()
]
end
def application do
[
extra_applications: [:logger]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:csv, "~> 3.2", only: :test},
{:dialyxir, "~> 1.4", only: :dev, runtime: false},
{:ex_doc, "~> 0.34", only: :dev},
{:math, "~> 0.7"},
{:nimble_options, "~> 1.1"},
{:patch, "~> 0.13", only: :test},
{:nx, "~> 0.7"}
# {:nx, path: "/Users/Greg/Development/nx/nx"}
]
end
defp package do
[
maintainers: ["Greg Woodward"],
licenses: ["MIT"],
links: %{"GitHub" => @source_url},
files: ~w(README.md lib mix.exs LICENSE.md)
]
end
defp docs() do
[
main: "readme",
source_ref: "v#{@version}",
source_url: @source_url,
extras: [
"README.md",
"guides/intro_to_integrator.livemd",
"guides/interpolation_and_fixed_times.livemd",
"guides/output_functions.livemd",
"guides/event_functions.livemd",
"guides/nonlinear_eqn_root.livemd"
],
before_closing_head_tag: &before_closing_head_tag/1,
javascript_config_path: nil
]
end
defp aliases do
[docs: ["docs", ©_images/1]]
end
defp copy_images(_) do
File.cp_r("images", "doc/images/")
# File.cp_r("images", "doc/images/", fn source, destination ->
# IO.gets("Overwriting #{destination} by #{source}. Type y to confirm. ") == "y\n"
# end)
end
def before_closing_head_tag(:epub), do: ""
def before_closing_head_tag(:html), do: File.read!("doc_config/before_closing_head_tag.html")
end