   A module for managing the overall project build procedure.
   """
 
-  import Serum.IOProxy, only: [put_err: 2, put_msg: 2]
+  import Serum.IOProxy, only: [put_msg: 2]
+  alias Serum.Build.FileCopier
   alias Serum.Build.FileEmitter
   alias Serum.Build.FileLoader
   alias Serum.Build.FileProcessor

  end

  @spec do_build(Project.t()) :: Result.t()
  defp do_build(proj) do
    with {:ok, files} <- FileLoader.load_files(proj.src),
         {:ok, map} <- FileProcessor.process_files(files, proj),
         {:ok, fragments} <- FragmentGenerator.to_fragment(map),
         {:ok, files} <- PageGenerator.run(fragments, map.templates["base"]) do
      FileEmitter.run(files)
    else
      {:error, _} = error -> error
    end

    end)
    |> Result.aggregate(:clean_dest)
  end
end
