-
Notifications
You must be signed in to change notification settings - Fork 3
/
mix.exs
126 lines (116 loc) · 4.61 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
115
116
117
118
119
120
121
122
123
124
125
126
defmodule Vtc.MixProject do
use Mix.Project
alias Vtc.Source.Frames
alias Vtc.Source.Seconds
def project do
[
app: :vtc,
version: "0.17.5",
description: "A SMPTE timecode library for Elixir",
source_url: "https://github.com/opencinemac/vtc-ex",
elixir: "~> 1.12",
elixirc_paths: elixirc_paths(Mix.env()),
test_coverage: [tool: :covertool],
aliases: aliases(),
docs: [
# The main page in the docs
main: "readme",
logo: "zdocs/source/assets/logo1.svg",
extras: [
"README.md",
"zdocs/quickstart.cheatmd",
"zdocs/ecto_quickstart.cheatmd",
"zdocs/history.md",
"zdocs/framerate_vs_timebase.md",
"zdocs/the_rational_rationale.md",
"CONTRIBUTING.md"
],
groups_for_modules: [
"Core API": [Vtc.Framestamp, Vtc.Framerate, Vtc.Framestamp.Range, Vtc],
Data: [Vtc.SMPTETimecode.Sections, Vtc.Rates, Vtc.FilmFormat],
"Frames Formats": [Frames.FeetAndFrames, Frames.SMPTETimecodeStr],
"Seconds Formats": [Seconds.PremiereTicks, Seconds.RuntimeStr],
"Source Protocols": [Seconds, Frames],
"Ecto Types": [
Vtc.Ecto.Postgres.Migrations,
Vtc.Ecto.Postgres.PgRational,
Vtc.Ecto.Postgres.PgRational.Migrations,
Vtc.Ecto.Postgres.PgFramerate,
Vtc.Ecto.Postgres.PgFramerate.Migrations,
Vtc.Ecto.Postgres.PgFramestamp,
Vtc.Ecto.Postgres.PgFramestamp.Migrations,
Vtc.Ecto.Postgres.PgFramestamp.Range,
Vtc.Ecto.Postgres.PgFramestamp.Range.Migrations
],
"Test Utilities": [Vtc.TestUtils.StreamDataVtc]
],
groups_for_docs: [
Parse: &(&1[:section] == :parse),
Manipulate: &(&1[:section] == :manipulate),
Inspect: &(&1[:section] == :inspect),
Compare: &(&1[:section] == :compare),
Arithmetic: &(&1[:section] == :arithmetic),
Convert: &(&1[:section] == :convert),
Consts: &(&1[:section] == :consts),
Perfs: &(&1[:section] == :perfs),
"Ecto Migrations": &(&1[:section] == :ecto_migrations),
"Changeset Validations": &(&1[:section] == :changeset_validators),
Full: &(&1[:section] == :migrations_full),
"Pg Constraints": &(&1[:section] == :migrations_constraints),
"Pg Types": &(&1[:section] == :migrations_types),
"Pg Casts": &(&1[:section] == :migrations_casts),
"Pg Operators": &(&1[:section] == :migrations_operators),
"Pg Operator Classes": &(&1[:section] == :migrations_operator_classes),
"Pg Functions": &(&1[:section] == :migrations_functions),
"Pg Private Functions": &(&1[:section] == :migrations_private_functions)
]
],
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
package: package(),
deps: deps(),
dialyzer: [plt_add_apps: Enum.map(deps(), &elem(&1, 0)) ++ [:ex_unit]]
]
end
# Specifies which paths to compile per environment.
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help compile.app" to learn about applications.
def application, do: []
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# Library Dependencies
{:decimal, "~> 2.0"},
{:ratio, "~> 4.0"},
{:ecto, "~> 3.10", optional: true},
{:ecto_sql, "~> 3.10", optional: true},
{:postgrex, ">= 0.0.0", optional: true},
{:stream_data, "~> 1.0", optional: true},
# Test dependencies
{:covertool, "~> 2.0", only: [:test]},
{:junit_formatter, "~> 3.1", only: [:test]},
# Dev dependencies
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.27", only: [:dev, :test], runtime: false},
{:styler, "~> 0.7", only: [:dev, :test], runtime: false},
{:examples_styler, "~> 0.1", only: [:dev, :test], runtime: false}
]
end
defp package do
[
# This option is only needed when you don't want to use the OTP application name
name: "vtc",
# These are the default files included in the package
files: ~w(lib mix.exs README.md* LICENSE*),
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/opencinemac/vtc-ex"}
]
end
defp aliases do
[docs: ["docs", ©_docs_images/1]]
end
# copies documentation images into the hexdox directory
defp copy_docs_images(_), do: File.cp_r("zdocs/source/assets", "doc/assets")
end