Web Dev Solutions

Catalin Mititiuc

From c9cc0ed856cb5066751613a23ffea6cff0ec960b Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Thu, 5 Dec 2024 14:51:31 -0800 Subject: Take watch dirs as an argument --- lib/pandoc.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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 ) -- cgit v1.2.3