-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
67 lines (59 loc) · 1.78 KB
/
Copy pathmix.exs
File metadata and controls
67 lines (59 loc) · 1.78 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
defmodule Aska.MixProject do
use Mix.Project
def project do
[
app: :aska,
version: "0.1.0",
elixir: "~> 1.18",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
preferred_cli_env: preferred_cli_env(),
]
end
# Run "mix help compile.app" to learn about applications.
def application do
case Mix.env() do
:test -> [mod: {AskaTest.Application, []}]
_ -> []
end
|> Keyword.merge(extra_applications: [: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
[
# Ash
{:ash, "~> 3.0"},
# data
{:ecto_sql, "~> 3.13", optional: true},
{:nanoid, "~> 2.1", optional: true},
# tools & test
{:ash_postgres, "~> 2.6", only: [:dev, :test], optional: true},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.31", only: [:dev], runtime: false},
{:faker, "~> 0.18.0", only: [:test]},
{:freedom_formatter, "~> 2.1", only: [:dev, :test], runtime: false},
{:git_ops, "~> 2.6", only: [:dev], runtime: false, optional: true},
{:igniter, "~> 0.6", only: [:dev, :test], runtime: false, optional: true},
{:sourceror, "~> 1.9", only: [:dev, :test]},
]
end
defp aliases() do
[
"ecto.setup": ["ecto.create --quiet", "ecto.migrate --quiet"],
format: ["format lib/*"],
"test.db": ["ecto.drop --quiet", "ecto.setup"],
test: ["test.db", "test"],
"test.format": ["format test/*"],
]
end
defp preferred_cli_env() do
[
"test.format": :test,
]
end
end