-
Notifications
You must be signed in to change notification settings - Fork 132
Expand file tree
/
Copy pathmix.exs
More file actions
87 lines (77 loc) · 2.39 KB
/
mix.exs
File metadata and controls
87 lines (77 loc) · 2.39 KB
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
defmodule Phoenix.PubSub.Mixfile do
use Mix.Project
@version "2.2.0"
def project do
[
app: :phoenix_pubsub,
version: @version,
elixir: "~> 1.13",
name: "Phoenix.PubSub",
description: "Distributed PubSub and Presence platform",
homepage_url: "http://www.phoenixframework.org",
elixirc_paths: elixirc_paths(Mix.env()),
package: package(),
docs: docs(),
deps: deps()
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
def application do
[
mod: {Phoenix.PubSub.Application, []},
extra_applications: [:logger, :crypto]
]
end
defp deps do
[
{:ex_doc, ">= 0.0.0", only: :docs}
]
end
defp package do
[
maintainers: ["Chris McCord", "José Valim", "Alexander Songe", "Gary Rennie"],
licenses: ["MIT"],
links: %{github: "https://github.com/phoenixframework/phoenix_pubsub"},
files: ~w(lib test/shared CHANGELOG.md LICENSE.md mix.exs README.md)
]
end
defp docs do
[
main: "Phoenix.PubSub",
source_ref: "v#{@version}",
source_url: "https://github.com/phoenixframework/phoenix_pubsub",
before_closing_body_tag: %{
html: """
<script defer src="https://cdn.jsdelivr.net/npm/mermaid@11.6.0/dist/mermaid.min.js"></script>
<script>
let initialized = false;
window.addEventListener("exdoc:loaded", () => {
if (!initialized) {
mermaid.initialize({
startOnLoad: false,
theme: document.body.className.includes("dark") ? "dark" : "default"
});
initialized = true;
}
let id = 0;
for (const codeEl of document.querySelectorAll("pre code.mermaid")) {
const preEl = codeEl.parentElement;
const graphDefinition = codeEl.textContent;
const graphEl = document.createElement("div");
const graphId = "mermaid-graph-" + id++;
mermaid.render(graphId, graphDefinition).then(({svg, bindFunctions}) => {
graphEl.innerHTML = svg;
bindFunctions?.(graphEl);
preEl.insertAdjacentElement("afterend", graphEl);
preEl.remove();
});
}
});
</script>
""",
epub: ""
}
]
end
end