index : pandoc | |
Hex package with a file-watcher and Mix task for using Pandoc to convert Markdown files to HTML. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <webdevcat@proton.me> | 2024-12-05 14:51:31 -0800 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-12-05 14:51:31 -0800 |
commit | c9cc0ed856cb5066751613a23ffea6cff0ec960b (patch) | |
tree | e151ed622b40b55fe49d86159c4b0554af3af757 | |
parent | 6fc8e8ec192051938da4d31459698d55b1e40ea2 (diff) |
Take watch dirs as an argument
-rw-r--r-- | lib/pandoc.ex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pandoc.ex b/lib/pandoc.ex index 1c3970d..ec5ce70 100644 --- a/lib/pandoc.ex +++ b/lib/pandoc.ex @@ -3,7 +3,7 @@ defmodule Pandoc do Documentation for `Pandoc`. """ - def run(profile, ["--watch"]) do + def run(profile, ["--watch" | dirs]) do IO.puts(""" Pandoc watcher starting, env: #{Application.get_env(:pandoc, profile) |> inspect(pretty: true)} @@ -12,7 +12,7 @@ defmodule Pandoc do ref = __MODULE__.Supervisor |> Supervisor.start_child( - Supervisor.child_spec({Pandoc.Watcher, [profile, dirs: ["documents"]]}, + Supervisor.child_spec({Pandoc.Watcher, [profile, dirs: dirs]}, restart: :transient, id: __MODULE__.Watcher ) |