Packages

Earmark is a pure-Elixir Markdown converter. It is intended to be used as a library (just call Earmark.as_html), but can also be used as a command-line tool (run mix escript.build first). Output generation is pluggable.

Retired package: testing

Current section

Files

Jump to

mix.exs

defmodule L42DummyHexProjectTest.MixProject do
use Mix.Project
@version "0.1.1"
@description """
Earmark is a pure-Elixir Markdown converter.
It is intended to be used as a library (just call Earmark.as_html),
but can also be used as a command-line tool (run mix escript.build
first).
Output generation is pluggable.
"""
############################################################
def project do
[
app: :l42_dummy_hex_project_test,
version: @version,
elixir: "~> 1.15",
elixirc_paths: elixirc_paths(Mix.env()),
deps: [],
description: @description,
package: package(),
aliases: [docs: &build_docs/1]
]
end
def application do
[
]
end
defp elixirc_paths(:test), do: ["lib", "test/support", "dev"]
defp elixirc_paths(:dev), do: ["lib", "lib1", "bench", "dev"]
defp elixirc_paths(_), do: ["lib", "lib1"]
defp package do
[
files: [
"lib",
"mix.exs",
"README.md"
],
maintainers: [
"Robert Dober <robert.dober@gmail.com>",
],
licenses: [
"Apache-2.0"
],
links: %{
"GitHub" => "https://github.com/robertdober"
}
]
end
@prerequisites """
run `mix escript.install hex ex_doc` and adjust `PATH` accordingly
"""
defp build_docs(_) do
Mix.Task.run("compile")
ex_doc = Path.join(Mix.path_for(:escripts), "ex_doc")
Mix.shell().info("Using escript: #{ex_doc} to build the docs")
unless File.exists?(ex_doc) do
raise "cannot build docs because escript for ex_doc is not installed, make sure to \n#{@prerequisites}"
end
args = ["L42DummyHexProjectTest", @version, Mix.Project.compile_path()]
opts = ~w[--main L42DummyHexProjectTest --source-ref v#{@version} --source-url #{@url}]
Mix.shell().info("Running: #{ex_doc} #{inspect(args ++ opts)}")
System.cmd(ex_doc, args ++ opts)
Mix.shell().info("Docs built successfully")
end
end
# SPDX-License-Identifier: Apache-2.0