Move watcher into a submodule; add mix task
This commit is contained in:
16
lib/mix/tasks/pandoc.ex
Normal file
16
lib/mix/tasks/pandoc.ex
Normal file
@@ -0,0 +1,16 @@
|
||||
defmodule Mix.Tasks.Pandoc do
|
||||
use Mix.Task
|
||||
|
||||
@out_dir "priv/static"
|
||||
|
||||
@impl true
|
||||
def run([profile | _args]) do
|
||||
IO.puts "profile: #{profile}"
|
||||
|
||||
"priv/posts"
|
||||
|> File.ls!()
|
||||
|> Enum.each(fn path ->
|
||||
Pandoc.install_and_run(Path.join(["priv", "posts", path]))
|
||||
end)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user