sloane.sh/lib/mix/tasks/site.build.ex

16 lines
350 B
Elixir
Raw Normal View History

2024-02-16 17:05:28 -05:00
defmodule Mix.Tasks.Site.Build do
@moduledoc "Build and output the site as HTML"
@shortdoc "build the site"
use Mix.Task
2024-02-16 17:27:46 -05:00
require Logger
2024-02-16 17:05:28 -05:00
alias SloaneSH.Format
@impl Mix.Task
def run(_args) do
2024-02-17 08:47:19 -05:00
Mix.Task.run("app.start")
2024-02-16 17:05:28 -05:00
{micro, :ok} = :timer.tc(&SloaneSH.build/0)
2024-02-16 17:27:46 -05:00
Logger.info("Built site in #{Format.time(micro)}")
2024-02-16 17:05:28 -05:00
end
end