-
Notifications
You must be signed in to change notification settings - Fork 8
/
mix.exs
100 lines (91 loc) · 2.2 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
defmodule Jetstream.MixProject do
use Mix.Project
@version "0.0.9"
@github "https://github.com/mmmries/jetstream"
def project do
[
app: :jetstream,
version: @version,
elixir: "~> 1.10",
elixirc_paths: elixirc_paths(Mix.env()),
source_url: @github,
start_permanent: Mix.env() == :prod,
deps: deps(),
package: package(),
docs: docs(),
aliases: aliases()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:crypto, :logger]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:broadway, "~> 1.0", optional: true},
{:connection, "~> 1.0"},
{:gnat, "~> 1.1"},
{:jason, "~> 1.1"},
{:ex_doc, "~> 0.27.3", only: :dev, runtime: false}
]
end
defp package do
[
description: "A Jetstream client in pure Elixir.",
licenses: ["Apache-2.0"],
links: %{
"GitHub" => @github,
"Changelog" => "#{@github}/blob/master/CHANGELOG.md"
},
maintainers: [
"Michael Ries",
"Benjamin Yu",
"Marek Kaput",
"Szymon Świerk",
"Mariusz Morawski"
]
]
end
defp docs do
[
main: "overview",
source_ref: "v#{@version}",
extras: [
"CHANGELOG.md",
"docs/introduction/overview.md",
"docs/introduction/getting_started.md",
"docs/guides/managing.md",
"docs/guides/push_based_consumer.md",
"docs/guides/broadway.md"
],
groups_for_extras: [
Introduction: ~r/docs\/introduction\/[^\/]+\.md/,
Guides: ~r/docs\/guides\/[^\/]+\.md/
]
]
end
defp aliases do
[
"test.watch": &test_watch/1
]
end
defp test_watch(flags) do
System.cmd(
"sh",
[
"-c",
"""
fswatch --one-per-batch --recursive lib/ test/ mix.exs mix.lock \
| mix test --color --listen-on-stdin #{Enum.join(flags)}
"""
],
into: IO.stream(:stdio, :line)
)
end
end