File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ defmodule Mix.Tasks.New do
126
126
create_directory "apps"
127
127
128
128
create_directory "config"
129
- create_file "config/config.exs" , config_template ( assigns )
129
+ create_file "config/config.exs" , config_umbrella_template ( assigns )
130
130
131
131
Mix . shell . info """
132
132
@@ -363,6 +363,26 @@ defmodule Mix.Tasks.New do
363
363
# import_config "#{Mix.env}.exs"
364
364
"""
365
365
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
+
366
386
embed_template :lib , """
367
387
defmodule <%= @mod %> do
368
388
end
You can’t perform that action at this time.
0 commit comments