Web Dev Solutions

Catalin Mititiuc

From d9dd7e8cadebf41581d341aac3ce2b647bd7ad0a Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Thu, 5 Dec 2024 10:02:11 -0800 Subject: Move watcher into a submodule; add mix task --- lib/mix/tasks/pandoc.ex | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/mix/tasks/pandoc.ex (limited to 'lib/mix/tasks/pandoc.ex') diff --git a/lib/mix/tasks/pandoc.ex b/lib/mix/tasks/pandoc.ex new file mode 100644 index 0000000..fe93208 --- /dev/null +++ b/lib/mix/tasks/pandoc.ex @@ -0,0 +1,16 @@ +defmodule Mix.Tasks.Pandoc do + use Mix.Task + + @out_dir "priv/static" + + @impl true + def run([profile | _args]) do + IO.puts "profile: #{profile}" + + "priv/posts" + |> File.ls!() + |> Enum.each(fn path -> + Pandoc.install_and_run(Path.join(["priv", "posts", path])) + end) + end +end -- cgit v1.2.3