summaryrefslogtreecommitdiff
path: root/mix.exs
blob: 430f0a88b13ceff239fb39f7d5d2676a2ebec835 (plain)
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
defmodule Chessh.MixProject do
  use Mix.Project

  def project do
    [
      app: :chessh,
      version: "0.1.0",
      elixir: "~> 1.14",
      start_permanent: Mix.env() == :prod,
      deps: deps(),
      elixirc_paths: elixirc_paths(Mix.env()),
      aliases: aliases()
    ]
  end

  # Run "mix help compile.app" to learn about applications.
  def application do
    [
      mod: {Chessh.Application, []},
      extra_applications: [:logger, :crypto, :syn, :ssh, :plug_cowboy, :inets, :ssl, :binbo]
    ]
  end

  defp elixirc_paths(:test), do: ["lib", "test/support"]
  defp elixirc_paths(_), do: ["lib"]

  # Run "mix help deps" to learn about dependencies.
  defp deps do
    [
      {:binbo, "~> 4.0.2"},
      {:ecto, "~> 3.9"},
      {:ecto_sql, "~> 3.9"},
      {:postgrex, "~> 0.16.5"},
      {:bcrypt_elixir, "~> 3.0"},
      {:hammer, "~> 6.1"},
      {:hammer_backend_redis, "~> 6.1"},
      {:syn, "~> 3.3"},
      {:jason, "~> 1.3"},
      {:plug_cowboy, "~> 2.2"},
      {:joken, "~> 2.5"},
      {:libcluster, "~> 3.3"}
    ]
  end

  defp aliases do
    [
      test: ["ecto.create --quiet", "ecto.migrate", "test --seed 0"]
    ]
  end
end