Skip to content

Commit 25485ac

Browse files
author
José Valim
committed
Bring back umbrella specific configuration
1 parent 519ccc8 commit 25485ac

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

lib/mix/lib/mix/tasks/new.ex

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ defmodule Mix.Tasks.New do
126126
create_directory "apps"
127127

128128
create_directory "config"
129-
create_file "config/config.exs", config_template(assigns)
129+
create_file "config/config.exs", config_umbrella_template(assigns)
130130

131131
Mix.shell.info """
132132
@@ -363,6 +363,26 @@ defmodule Mix.Tasks.New do
363363
# import_config "#{Mix.env}.exs"
364364
"""
365365

366+
embed_template :config_umbrella, ~S"""
367+
# This file is responsible for configuring your application
368+
# and its dependencies with the aid of the Mix.Config module.
369+
use Mix.Config
370+
371+
# By default, the umbrella project as well as each child
372+
# application will require this configuration file, ensuring
373+
# they all use the same configuration. While one could
374+
# configure all applications here, we prefer to delegate
375+
# back to each application for organization purposes.
376+
import_config "../apps/*/config/config.exs"
377+
378+
# Sample configuration (overrides the imported configuration above):
379+
#
380+
# config :logger, :console,
381+
# level: :info,
382+
# format: "$date $time [$level] $metadata$message\n",
383+
# metadata: [:user_id]
384+
"""
385+
366386
embed_template :lib, """
367387
defmodule <%= @mod %> do
368388
end

0 commit comments

Comments
 (0)