Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-12-05 10:02:11 -0800
committerCatalin Mititiuc <webdevcat@proton.me>2024-12-05 10:02:11 -0800
commitd9dd7e8cadebf41581d341aac3ce2b647bd7ad0a (patch)
tree6da8b55b532d7710250103056a1f213b5f63839a /lib/mix/tasks/pandoc.ex
parentd90365c58497274f65cd0c7b05606029bd756065 (diff)
Move watcher into a submodule; add mix task
Diffstat (limited to 'lib/mix/tasks/pandoc.ex')
-rw-r--r--lib/mix/tasks/pandoc.ex16
1 files changed, 16 insertions, 0 deletions
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