Take watch dirs as an argument
This commit is contained in:
parent
9cb7bf35ab
commit
58747a4bc6
@ -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
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user