Current section
Files
Jump to
Current section
Files
template/$PROJECT_NAME$/mix.exs
defmodule <%= @project_name_camel_case %>.MixProject do
use Mix.Project
def project do
[
app: :<%= @project_name %>,
version: "0.1.0",
elixir: "~> 1.8",
elixirc_paths: elixirc_paths(Mix.env()),
elixirc_options: [warnings_as_errors: true],
compilers: Mix.compilers(),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
"coveralls": :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test
],
dialyzer: [
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
ignore_warnings: ".dialyzer_ignore.exs"
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger, :runtime_tools]
]
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
[
# dev, test
{:excoveralls, "~> 0.10", only: :test, runtime: false},
{:credo, "~> 1.0", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.0.0-rc.6", only: [:dev, :test], runtime: false}
]
end
# Aliases are shortcuts or tasks specific to the current project.
# For example, to create, migrate and run the seeds file at once:
#
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
quality: ["format", "coveralls", "credo --strict", "dialyzer", "test"],
"quality.ci": [
"test",
"coveralls",
"format --check-formatted",
"credo --strict",
"dialyzer --halt-exit-status"
]
]
end
end