Skip to content

Commit

Permalink
Merge pull request #262 from nimblehq/bug/252-resolve-warning-config
Browse files Browse the repository at this point in the history
[#252][Chore] Resolve the Gettext warning in config
  • Loading branch information
byhbt authored Sep 19, 2022
2 parents 9b323c1 + d77a37c commit bc80cff
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/nimble_template/templates/variants/phoenix/template.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule NimbleTemplate.Templates.Phoenix.Template do

import NimbleTemplate.{AddonHelper, GithubHelper}

alias NimbleTemplate.Addons
alias NimbleTemplate.{Addons, Generator}
alias NimbleTemplate.Addons.Phoenix, as: PhoenixAddons
alias NimbleTemplate.Projects.Project
alias NimbleTemplate.Templates.Phoenix.Api.Template, as: ApiTemplate
Expand All @@ -18,6 +18,9 @@ defmodule NimbleTemplate.Templates.Phoenix.Template do

# credo:disable-for-next-line Credo.Check.Refactor.ABCSize
defp apply_phoenix_common_setup(%Project{} = project) do
# TODO: Remove me after the Phoenix generator fix releases: https://github.com/phoenixframework/phoenix/pull/4894
remove_mix_compiler_config()

project
|> apply_default_common_phoenix_addons()
|> apply_optional_common_phoenix_addons()
Expand Down Expand Up @@ -108,4 +111,8 @@ defmodule NimbleTemplate.Templates.Phoenix.Template do

defp apply_phoenix_variant_setup(%Project{web_project?: true, live_project?: true} = project),
do: LiveTemplate.apply(project)

defp remove_mix_compiler_config() do
Generator.delete_content("mix.exs", "compilers: [:gettext] ++ Mix.compilers(),")
end
end

0 comments on commit bc80cff

Please sign in to comment.