-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathmix.exs
64 lines (59 loc) · 1.79 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
defmodule Transport.MixProject do
use Mix.Project
def project do
[
apps_path: "apps",
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(Mix.env()),
test_coverage: [tool: ExCoveralls],
dialyzer: [
plt_add_deps: :app_tree,
plt_add_apps: [:mix],
plt_local_path: "dialyzer-plt",
plt_core_path: "dialyzer-plt"
],
preferred_cli_env: [
check_all: :test
]
]
end
defp deps do
[
# locally, you can use :dialyxir in :dev mode, and we also add
# :test to ensure CI can run it with a single compilation (in test target),
# to reduce build time
{:dialyxir, "~> 1.2", only: [:dev, :test], runtime: false},
{:excoveralls, "~> 0.10", only: :test},
{:saxy, "~> 1.5"},
{:appsignal, "~> 2.0"},
{:appsignal_phoenix, "~> 2.0"},
{:ecto_erd, "~> 0.5.0", only: [:dev]}
]
end
defp aliases do
[
test: ["ecto.create --quiet", "ecto.migrate", "test"],
"phx.migrate_phx.server": ["ecto.migrate", "phx.server"],
check_all: [
"format --check-formatted",
~s(npm "run linter:sass"),
# from https://hexdocs.pm/mix/1.12/Mix.Task.html#run/2
# Remember: by default, tasks will only run once, even when called repeatedly!
# If you need to run a task multiple times, you need to re-enable it via reenable/1 or call it using rerun/2."
# => here, npm task need to be run twice
fn _ -> Mix.Task.reenable("npm") end,
~s(npm "run linter:ecma"),
"credo --strict",
"gettext.extract --check-up-to-date",
"test"
]
]
end
defp aliases(:dev) do
aliases() ++ ["ecto.migrate": ["ecto.migrate", "ecto.dump"]]
end
defp aliases(_env) do
aliases()
end
end