Skip to content

Commit

Permalink
Copy images to the doc folder
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-akya committed Dec 15, 2023
1 parent 25a5575 commit 71a21be
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ defmodule Exile.MixProject do
make_targets: ["all"],
make_clean: ["clean"],
deps: deps(),
aliases: aliases(),

# Package
package: package(),
Expand Down Expand Up @@ -61,4 +62,14 @@ defmodule Exile.MixProject do
{:dialyxir, "~> 1.0", only: [:dev], runtime: false}
]
end

defp aliases do
[docs: ["docs", &copy_images/1]]
end

defp copy_images(_) do
File.cp_r("./images", "./doc/images/", fn source, destination ->
IO.gets("Overwriting #{destination} by #{source}. Type y to confirm. ") == "y\n"
end)
end
end

0 comments on commit 71a21be

Please sign in to comment.