diff --git a/installer/lib/phx_new/ecto.ex b/installer/lib/phx_new/ecto.ex index 7672e64a11..bd471acc70 100644 --- a/installer/lib/phx_new/ecto.ex +++ b/installer/lib/phx_new/ecto.ex @@ -21,7 +21,7 @@ defmodule Phx.New.Ecto do app_path = Path.expand(project.base_path) project_path = Path.dirname(Path.dirname(app_path)) - %Project{project | in_umbrella?: true, app_path: app_path, project_path: project_path} + %{project | in_umbrella?: true, app_path: app_path, project_path: project_path} end def generate(%Project{} = project) do diff --git a/installer/lib/phx_new/generator.ex b/installer/lib/phx_new/generator.ex index 18a8cd94ef..f27d073fc8 100644 --- a/installer/lib/phx_new/generator.ex +++ b/installer/lib/phx_new/generator.ex @@ -242,7 +242,7 @@ defmodule Phx.New.Generator do dev: dev ] - %Project{project | binding: binding} + %{project | binding: binding} end defp namespaced?(project) do diff --git a/installer/lib/phx_new/mailer.ex b/installer/lib/phx_new/mailer.ex index 1fd80c1dc2..bfa99276e9 100644 --- a/installer/lib/phx_new/mailer.ex +++ b/installer/lib/phx_new/mailer.ex @@ -11,7 +11,7 @@ defmodule Phx.New.Mailer do app_path = Path.expand(project.base_path) project_path = Path.dirname(Path.dirname(app_path)) - %Project{project | in_umbrella?: true, app_path: app_path, project_path: project_path} + %{project | in_umbrella?: true, app_path: app_path, project_path: project_path} end def generate(%Project{} = project) do diff --git a/installer/lib/phx_new/single.ex b/installer/lib/phx_new/single.ex index 989c4d7255..96d389117f 100644 --- a/installer/lib/phx_new/single.ex +++ b/installer/lib/phx_new/single.ex @@ -100,9 +100,9 @@ defmodule Phx.New.Single do def prepare_project(%Project{app: app, base_path: base_path} = project) when not is_nil(app) do if in_umbrella?(base_path) do - %Project{project | in_umbrella?: true, project_path: Path.dirname(Path.dirname(base_path))} + %{project | in_umbrella?: true, project_path: Path.dirname(Path.dirname(base_path))} else - %Project{project | in_umbrella?: false, project_path: base_path} + %{project | in_umbrella?: false, project_path: base_path} end |> put_app() |> put_root_app() @@ -110,11 +110,11 @@ defmodule Phx.New.Single do end defp put_app(%Project{base_path: base_path} = project) do - %Project{project | app_path: base_path} + %{project | app_path: base_path} end defp put_root_app(%Project{app: app, opts: opts} = project) do - %Project{ + %{ project | root_app: app, root_mod: Module.concat([opts[:module] || Macro.camelize(app)]) @@ -122,7 +122,7 @@ defmodule Phx.New.Single do end defp put_web_app(%Project{app: app} = project) do - %Project{ + %{ project | web_app: app, lib_web_name: "#{app}_web", diff --git a/installer/lib/phx_new/umbrella.ex b/installer/lib/phx_new/umbrella.ex index 7a309478d2..452022dd28 100644 --- a/installer/lib/phx_new/umbrella.ex +++ b/installer/lib/phx_new/umbrella.ex @@ -28,14 +28,14 @@ defmodule Phx.New.Umbrella do project_path = Path.expand(project.base_path <> "_umbrella") app_path = Path.join(project_path, "apps/#{project.app}") - %Project{project | in_umbrella?: true, app_path: app_path, project_path: project_path} + %{project | in_umbrella?: true, app_path: app_path, project_path: project_path} end def put_web(%Project{app: app, opts: opts} = project) do web_app = :"#{app}_web" web_namespace = Module.concat([opts[:web_module] || "#{project.app_mod}Web"]) - %Project{ + %{ project | web_app: web_app, lib_web_name: web_app, @@ -46,7 +46,7 @@ defmodule Phx.New.Umbrella do end defp put_root_app(%Project{app: app} = project) do - %Project{ + %{ project | root_app: :"#{app}_umbrella", root_mod: Module.concat(project.app_mod, "Umbrella") diff --git a/installer/lib/phx_new/web.ex b/installer/lib/phx_new/web.ex index 6f68baf7ac..3a899e119e 100644 --- a/installer/lib/phx_new/web.ex +++ b/installer/lib/phx_new/web.ex @@ -61,7 +61,7 @@ defmodule Phx.New.Web do web_path = Path.expand(project.base_path) project_path = Path.dirname(Path.dirname(web_path)) - %Project{ + %{ project | in_umbrella?: true, project_path: project_path,