mirror of
https://github.com/ash-project/igniter.git
synced 2024-09-19 13:02:51 +12:00
This commit is contained in:
parent
dbf1386fcf
commit
13f7327e4b
1 changed files with 4 additions and 4 deletions
|
@ -50,12 +50,12 @@ defmodule Igniter.Project.Config do
|
||||||
|> Igniter.update_elixir_file("config/runtime.exs", fn zipper ->
|
|> Igniter.update_elixir_file("config/runtime.exs", fn zipper ->
|
||||||
patterns = [
|
patterns = [
|
||||||
"""
|
"""
|
||||||
if config_env() == :prod do
|
if config_env() == #{inspect(env)} do
|
||||||
__cursor__()
|
__cursor__()
|
||||||
end
|
end
|
||||||
""",
|
""",
|
||||||
"""
|
"""
|
||||||
if :prod == config_env() do
|
if #{inspect(env)} == config_env() do
|
||||||
__cursor__()
|
__cursor__()
|
||||||
end
|
end
|
||||||
"""
|
"""
|
||||||
|
@ -82,7 +82,7 @@ defmodule Igniter.Project.Config do
|
||||||
:error ->
|
:error ->
|
||||||
zipper
|
zipper
|
||||||
|> Igniter.Code.Common.add_code("""
|
|> Igniter.Code.Common.add_code("""
|
||||||
if config_env() == :prod do
|
if config_env() == #{inspect(env)} do
|
||||||
end
|
end
|
||||||
""")
|
""")
|
||||||
|> Igniter.Code.Common.move_to_cursor_match_in_scope(patterns)
|
|> Igniter.Code.Common.move_to_cursor_match_in_scope(patterns)
|
||||||
|
@ -109,7 +109,7 @@ defmodule Igniter.Project.Config do
|
||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
# in `runtime.exs`
|
# in `runtime.exs`
|
||||||
if config_env() == :prod do
|
if config_env() == #{inspect(env)} do
|
||||||
# Please configure #{inspect([app_name | config_path])} it to the following value
|
# Please configure #{inspect([app_name | config_path])} it to the following value
|
||||||
#{value}
|
#{value}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue