Current section
Files
Jump to
Current section
Files
mix.exs
defmodule Cape.MixProject do
use Mix.Project
@version "0.1.13"
def project do
[
app: :cape,
version: @version,
elixir: "~> 1.12",
start_permanent: Mix.env() == :prod,
deps: deps(),
description: description(),
package: package(),
docs: docs(),
deps: deps(),
name: "Cape",
source_url: "https://github.com/alai-arpas/cape"
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger, :httpoison]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:httpoison, "~> 1.8"},
{:poison, "~> 3.1"},
{:nimble_csv, "~> 1.2"},
{:flow, "~> 1.2.4"},
{:ex_doc, "~> 0.29", only: :dev, runtime: false},
{:makeup_eex, ">= 0.1.1", only: :docs}
]
end
defp description() do
"""
This package is used for learning purposes on how to use 'mix' and 'hex'
for sharing elixir code.
Do NOT waste your time here.
The License is MIT, but the project uses a private api.
"""
end
defp docs do
[
main: "Cape",
source_ref: "v#{@version}",
source_url: "https://github.com/alai-arpas/cape",
extra_section: "GUIDE",
extras: extras(),
groups_for_extras: groups_for_extras(),
groups_for_modules: groups_for_modules(),
groups_for_functions: [
Components: &(&1[:type] == :component),
Macros: &(&1[:type] == :macro)
],
skip_undefined_reference_warnings_on: ["CHANGELOG.md"],
before_closing_body_tag: &before_closing_body_tag/1
]
end
defp before_closing_body_tag(:html) do
"""
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10.0.2/dist/mermaid.esm.min.mjs';
mermaid.initialize({
securityLevel: 'loose',
theme: 'base'
});
</script>
<style>
code.mermaid text.flowchartTitleText {
fill: var(--textBody) !important;
}
code.mermaid g.cluster > rect {
fill: var(--background) !important;
stroke: var(--neutralBackground) !important;
}
code.mermaid g.cluster[id$="__transparent"] > rect {
fill-opacity: 0 !important;
stroke: none !important;
}
code.mermaid g.nodes span.nodeLabel > em {
font-style: normal;
background-color: white;
opacity: 0.5;
padding: 1px 2px;
border-radius: 5px;
}
code.mermaid g.edgePaths > path {
stroke: var(--textBody) !important;
}
code.mermaid g.edgeLabels span.edgeLabel:not(:empty) {
background-color: var(--textBody) !important;
padding: 3px 5px !important;
border-radius:25%;
color: var(--background) !important;
}
code.mermaid .marker {
fill: var(--textBody) !important;
stroke: var(--textBody) !important;
}
</style>
"""
end
defp before_closing_body_tag(_), do: ""
defp extras do
[
"CHANGELOG.md",
"guides/introduzione/introduzione.md",
"guides/esri/note.md"
]
end
defp groups_for_extras do
[
Introduzione: ~r/guides\/introduzione\/.?/,
"Esri note": ~r/guides\/esri\/.?/
]
end
defp groups_for_modules do
# Ungrouped Modules:
#
# Cape
# Snapshot
[
CAE: [
Arpas.REST.Cae.Api,
Arpas.REST.Cae.Env
],
ESRI: [
Arpas.REST.Esri.Api,
Arpas.REST.Esri.Env
]
]
end
defp package() do
[
licenses: ["MIT"],
links: %{"GitHub" => "https://github.com/alai-arpas/cape"}
]
end
end