-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathmix.exs
90 lines (79 loc) · 1.76 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
defmodule Modbux.Mixfile do
use Mix.Project
@version "0.3.13"
@source_url "https://github.com/valiot/modbux"
def project do
[
app: :modbux,
version: @version,
elixir: "~> 1.8",
name: "Modbux",
docs: docs(),
description: description(),
package: package(),
source_url: @source_url,
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
]
end
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
{:circuits_uart, "~> 1.3"},
{:ex_doc, "~> 0.19", only: :dev},
{:ring_logger, "~> 0.4"}
]
end
defp extras(), do: ["README.md"]
defp docs do
[
main: "readme",
source_ref: "v#{@version}",
canonical: "http://hexdocs.pm/modbux",
logo: "assets/images/valiot-logo-blue.png",
source_url: @source_url,
extras: extras(),
groups_for_modules: [
"Modbus RTU": [
Modbux.Rtu.Master,
Modbux.Rtu.Slave,
],
"Modbus TCP": [
Modbux.Tcp.Client,
Modbux.Tcp.Server,
],
]
]
end
defp description do
"Modbus for network and serial communication, this library implements TCP (Client & Server) and RTU (Master & Slave) protocols."
end
defp aliases do
[docs: ["docs", ©_images/1]]
end
defp copy_images(_) do
File.ls!("assets/images")
|> Enum.each(fn x ->
File.cp!("assets/images/#{x}", "doc/assets/#{x}")
end)
end
defp package do
[
files: [
"lib",
"test",
"mix.exs",
"README.md",
"LICENSE"
],
maintainers: ["valiot"],
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/valiot/modbux"}
]
end
end