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-11 18:11:43 -0800 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-12-11 18:11:43 -0800 |
commit | 7ad009e1adb16ed88ce6618515d35118a1708a79 (patch) | |
tree | 3efb4c6036b1ca1deefbb5345b29c95f2c412e99 /lib | |
parent | 192d65a059c7f359bb7e3bc8927fc2efd24de92e (diff) |
Git watcher dirs from config
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pandoc.ex | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pandoc.ex b/lib/pandoc.ex index 882d772..9002bb5 100644 --- a/lib/pandoc.ex +++ b/lib/pandoc.ex @@ -3,7 +3,11 @@ defmodule Pandoc do Documentation for `Pandoc`. """ - def run(profile, ["--watch" | dirs]) do + def run(profile, ["--watch" | _]) do + config = Application.get_env(:pandoc, profile) + opts = [cd: config[:cd] || File.cwd!()] + dirs = [opts[:cd], Path.join(opts[:cd], "_drafts")] + ref = __MODULE__.Supervisor |> Supervisor.start_child( |