Git watcher dirs from config

This commit is contained in:
Catalin Constantin Mititiuc 2025-06-17 11:17:37 -07:00
parent a248af3d3c
commit 5d32221174

View File

@ -3,7 +3,11 @@ defmodule Pandoc do
Documentation for `Pandoc`. 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 = ref =
__MODULE__.Supervisor __MODULE__.Supervisor
|> Supervisor.start_child( |> Supervisor.start_child(