Packages

Mix archive for scaffolding Corex into new Phoenix apps and Tableau sites. Install with `mix archive.install hex corex_new`, then run `mix corex.new` or `mix corex.tableau.new`. Requires the `phx_new` archive for Phoenix apps.

Current section

Files

Jump to
corex_new mix.exs
Raw

mix.exs

for path <- :code.get_path(),
Regex.match?(~r/corex_new-[\w\.\-]+\/ebin$/, List.to_string(path)) do
Code.delete_path(path)
end
defmodule Corex.New.MixProject do
use Mix.Project
@version "0.2.1"
@phoenix_version "1.8.7"
@scm_url "https://github.com/corex-ui/corex"
@elixir_requirement "~> 1.17"
def project do
[
app: :corex_new,
elixirc_paths: elixirc_paths(Mix.env()),
test_coverage: [summary: [threshold: 90], ignore_modules: [Corex.New.MixHelper]],
start_permanent: Mix.env() == :prod,
version: @version,
phoenix_version: @phoenix_version,
elixir: @elixir_requirement,
deps: deps(),
aliases: aliases(),
dialyzer: dialyzer(),
package: [
maintainers: ["Karim Semmoud"],
licenses: ["MIT"],
links: %{"GitHub" => @scm_url},
files:
~w(lib priv/gettext priv/static priv/tableau templates mix.exs README.md CHANGELOG.md LICENSE)
],
source_url: @scm_url,
docs: docs(),
homepage_url: "https://corex.gigalixirapp.com/en",
description: """
Mix archive for scaffolding Corex into new Phoenix apps and Tableau sites.
Install with `mix archive.install hex corex_new`, then run `mix corex.new`
or `mix corex.tableau.new`. Requires the `phx_new` archive for Phoenix apps.
"""
]
end
def cli do
[preferred_envs: [docs: :docs, lint: :test]]
end
def application do
[
extra_applications: [:eex, :crypto, :public_key, :ssl, :inets]
]
end
def deps do
[
{:ex_doc, "~> 0.40", only: :docs, runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:oeditus_credo, "~> 0.6.3", only: [:dev, :test], runtime: false},
{:sobelow, "~> 0.13", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:corex_design, path: "../design", only: :test, runtime: false}
] ++ maybe_ex_slop()
end
defp maybe_ex_slop do
if Version.match?(System.version(), "~> 1.18") do
[{:ex_slop, "~> 0.4.1", only: [:dev, :test], runtime: false}]
else
[]
end
end
defp dialyzer do
[
plt_local_path: "_build/plts",
plt_core_path: "_build/plts",
plt_add_apps: [:mix, :ex_unit],
flags: [:error_handling, :extra_return, :missing_return, :unmatched_returns]
]
end
defp docs do
[
main: "readme",
extras: ["README.md", "CHANGELOG.md"],
source_ref: "v#{@version}",
source_url_pattern: "#{@scm_url}/blob/v#{@version}/installer/%{path}#L%{line}"
]
end
defp aliases do
[
lint: [
"format --check-formatted",
"compile --force --warnings-as-errors",
"compile --force --warnings-as-errors --env test",
"credo --strict",
"sobelow --exit"
]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
end