defmodule Dmp.MixProject do use Mix.Project @version "0.1.0" @github_project_url "https://github.com/pzingg/diff_match_patch" def project do [ app: :diff_match_patch, version: @version, elixir: "~> 1.11", start_permanent: Mix.env() == :prod, deps: deps(), source_url: @github_project_url, hompepage_url: @github_project_url, description: description(), package: package(), docs: docs() ] end # Run "mix help compile.app" to learn about applications. def application do [ # extra_applications: [:logger] ] end defp description do """ An Elixir implementation of the Google diff_match_patch library. """ end defp package do [ licenses: ["Apache-2.0"], links: %{"GitHub" => @github_project_url} ] end # Load KaTeX JavaScript to docs for math expressions defp docs do [ authors: ["Peter Zingg "], assets: "priv/assets", javascript_config_path: "assets/docs_config.js", extras: ["README.md": [filename: "readme", title: "Diff Match Patch"]], main: "readme", # You can specify a function for adding # custom content to the generated HTML. # This is useful for custom JS/CSS files you want to include. before_closing_head_tag: &before_closing_head_tag/1, before_closing_body_tag: &before_closing_body_tag/1 ] end # In our case we simply add a tags to load KaTeX # from CDN and then specify the configuration. # Once loaded, the script will dynamically render all LaTeX # expressions on the page in place. # For more details and options see https://katex.org/docs/autorender.html defp before_closing_head_tag(:html) do """ """ end defp before_closing_head_tag(_), do: "" # The `sbMacro` function is a workaround to the problem that # two underscores in Markdown are processed before KaTeX can # see them. defp before_closing_body_tag(:html) do """ """ end defp before_closing_body_tag(_), do: "" # Run "mix help deps" to learn about dependencies. defp deps do [ # {:dep_from_hexpm, "~> 0.3.0"}, # {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"} {:credo, "~> 1.6", only: [:dev, :test], runtime: false}, {:dialyxir, "~> 1.0", only: :dev, runtime: false}, {:ex_doc, "~> 0.28", only: :dev, runtime: false} ] end end