diff --git a/config/config.exs b/config/config.exs new file mode 100644 index 0000000..2b5efec --- /dev/null +++ b/config/config.exs @@ -0,0 +1,4 @@ +import Config + +config :logger, :default_formatter, + format: "$time $metadata[$level] $message\n" diff --git a/lib/mix/tasks/site.build.ex b/lib/mix/tasks/site.build.ex index f654a76..f93caf2 100644 --- a/lib/mix/tasks/site.build.ex +++ b/lib/mix/tasks/site.build.ex @@ -8,6 +8,7 @@ defmodule Mix.Tasks.Site.Build do @impl Mix.Task def run(_args) do + Mix.Task.run("app.start") {micro, :ok} = :timer.tc(&SloaneSH.build/0) Logger.info("Built site in #{Format.time(micro)}") end diff --git a/lib/mix/tasks/site.dev.ex b/lib/mix/tasks/site.dev.ex index 47f4c14..ff90ddc 100644 --- a/lib/mix/tasks/site.dev.ex +++ b/lib/mix/tasks/site.dev.ex @@ -5,6 +5,7 @@ defmodule Mix.Tasks.Site.Dev do @impl Mix.Task def run(_args) do + Mix.Task.run("app.start") {:ok, watch_pid} = Task.start_link(fn -> Mix.Task.run("site.watch") diff --git a/lib/mix/tasks/site.serve.ex b/lib/mix/tasks/site.serve.ex index cbebd5b..34a9d12 100644 --- a/lib/mix/tasks/site.serve.ex +++ b/lib/mix/tasks/site.serve.ex @@ -6,16 +6,9 @@ defmodule Mix.Tasks.Site.Serve do @impl Mix.Task def run(_args) do + Mix.Task.run("app.start") Logger.info("Starting development server...") - {:ok, _} = - Application.ensure_all_started([ - :telemetry, - :plug, - :thousand_island, - :bandit - ]) - {:ok, pid} = SloaneSH.serve() unless iex_running?() do diff --git a/lib/mix/tasks/site.watch.ex b/lib/mix/tasks/site.watch.ex index d1d6dcf..02c71fe 100644 --- a/lib/mix/tasks/site.watch.ex +++ b/lib/mix/tasks/site.watch.ex @@ -6,6 +6,7 @@ defmodule Mix.Tasks.Site.Watch do @impl Mix.Task def run(_args) do + Mix.Task.run("app.start") Logger.info("Starting site.watch...") {:ok, pid} = SloaneSH.watch()