   end
 
   defp default_config do
-    [aliases: [],
-     build_embedded: false,
-     build_per_environment: true,
-     build_scm: Mix.SCM.Path,
-     config_path: "config/config.exs",
-     consolidate_protocols: true,
-     default_task: "run",
-     deps: [],
-     deps_path: "deps",
-     elixirc_paths: ["lib"],
-     erlc_paths: ["src"],
-     erlc_include_path: "include",
-     erlc_options: [:debug_info],
-     lockfile: "mix.lock",
-     preferred_cli_env: [],
-     start_permanent: false]
+    [
+      aliases: [],
+      build_embedded: false,
+      build_per_environment: true,
+      build_scm: Mix.SCM.Path,
+      config_path: "config/config.exs",
+      consolidate_protocols: true,
+      default_task: "run",
+      deps: [],
+      deps_path: "deps",
+      elixirc_paths: ["lib"],
+      erlc_paths: ["src"],
+      erlc_include_path: "include",
+      erlc_options: [:debug_info],
+      lockfile: "mix.lock",
+      preferred_cli_env: [],
+      start_permanent: false
+    ]
   end
 
   @private_config [:app_path, :build_scm, :env_path]
-  defp get_project_config(nil),  do: []
+  defp get_project_config(nil), do: []
   defp get_project_config(atom), do: atom.project |> Keyword.drop(@private_config)
 end

  files in the `config` directory that do not start with a trailing
  period (for example, `.my_config.exs`).
  """
  @spec config_files() :: [Path.t]
  def config_files do
    [Mix.Dep.Lock.manifest] ++
      case Mix.ProjectStack.peek do
        %{config: config, file: file} ->
          configs =
            config[:config_path]
            |> Path.dirname
            |> Path.join("**/*.*")
            |> Path.wildcard
            |> Enum.reject(&String.starts_with?(Path.basename(&1), "."))
          [file | configs]
        _ ->
          []
      end
  end

  @doc """

  # Invoked after each Mix.Project is compiled.
  @doc false
  def __after_compile__(env, _binary) do
    push(env.module, env.file)
  end

  # Push a project onto the project stack.
  # Only the top of the stack can be accessed.
  @doc false
  def push(atom, file \\ nil, app \\ nil) when is_atom(atom) do
    file = file || (atom && List.to_string(atom.__info__(:compile)[:source]))

    config = Keyword.merge([app: app] ++ default_config(), get_project_config(atom))

    case Mix.ProjectStack.push(atom, config, file) do
      :ok ->
        :ok

      {:error, other} when is_binary(other) ->
        Mix.raise(
          "Trying to load #{inspect(atom)} from #{inspect(file)}" <>
            " but another project with the same name was already defined at #{inspect(other)}"
        )
    end
  end

  # Pops a project from the stack.
  @doc false
  def pop do
    Mix.ProjectStack.pop()
  end

  # The configuration that is pushed down to dependencies.
  @doc false
  def deps_config(config \\ config()) do
    [
      build_embedded: config[:build_embedded],
      build_per_environment: config[:build_per_environment],
      consolidate_protocols: false,
      deps_path: deps_path(config),
      env_path: build_path(config)
    ]
  end

  @doc """
