-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmix.exs
88 lines (79 loc) · 2.17 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
defmodule Project do
use Mix.Project
@version "0.4.0"
def project do
[
app: :grammar,
version: @version,
elixirc_options: elixirc_options(Mix.env()),
elixirc_paths: elixirc_paths(Mix.env()),
consolidate_protocols: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
name: "Grammar",
source_url: "https://github.com/nmichel/ex_grammar",
docs: docs(),
description: description(),
package: package()
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp elixirc_options(:dev), do: [warnings_as_errors: false]
defp elixirc_options(_), do: [warnings_as_errors: true]
defp deps do
[
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.31", only: :dev, runtime: false},
{:mix_audit, "~> 2.1", only: [:dev, :test], runtime: false}
]
end
defp aliases do
[
check: [
"format --check-formatted",
"credo --strict",
"dialyzer"
]
]
end
defp docs do
[
main: "README",
extras: [
"README.md",
"LICENSE.md",
"CHANGELOG.md",
"examples/dsl/math_to_french.md",
"examples/dsl/math_to_function.md",
"examples/dsl/ip_list.md",
"notebooks/dsl_intro.livemd",
"notebooks/grammar_intro.livemd",
"notebooks/musing_with_codegen.livemd",
"notebooks/mp3_header_parser.livemd"
],
groups_for_extras: [
"DSL Examples": Path.wildcard("examples/dsl/*.md"),
Livebooks: Path.wildcard("notebooks/*.livemd")
],
groups_for_modules: [
Internal: [Grammar.Clause, Grammar.Rule, Grammar.RulesChecker],
"Code generation": [~r/^Grammar.CodeGen/]
],
source_ref: "v#{@version}"
]
end
defp description do
"""
A simple DSL to define parsers / transformers for LL(1) structured inputs.
"""
end
defp package do
[
licenses: ["MIT"],
maintainers: ["Nicolas Michel"],
links: %{"GitHub" => "https://github.com/nmichel/ex_grammar"}
]
end
end