You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/mix/tasks/backpex.install.ex
+22-4Lines changed: 22 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -157,7 +157,7 @@ if Code.ensure_loaded?(Igniter) do
157
157
Igniter.add_notice(igniter,"Installed daisyUI via npm.")
158
158
else
159
159
true->
160
-
Mix.shell().info("daisyui is already installed. Skipping.")
160
+
Mix.shell().info("daisyUI is already installed. Skipping.")
161
161
igniter
162
162
163
163
{:error,error}->
@@ -231,8 +231,26 @@ if Code.ensure_loaded?(Igniter) do
231
231
igniter
232
232
233
233
{:error,igniter}->
234
-
Mix.raise("Failed to add backpex routes")
235
-
igniter
234
+
Warning.warn_with_code_sample(
235
+
igniter,
236
+
"""
237
+
Failed to add backpex routes automatically. Please manually add the following to your router.ex:
238
+
239
+
1. Add the import at the top of your router file:
240
+
""",
241
+
"import Backpex.Router"
242
+
)
243
+
|>Warning.warn_with_code_sample(
244
+
"""
245
+
2. Add the backpex routes in a scope with the browser pipeline:
246
+
""",
247
+
"""
248
+
scope "/admin", #{Phoenix.web_module(igniter)} do
249
+
pipe_through :browser
250
+
backpex_routes()
251
+
end
252
+
"""
253
+
)
236
254
end
237
255
end
238
256
end
@@ -298,7 +316,7 @@ if Code.ensure_loaded?(Igniter) do
298
316
299
317
defpremove_bg_white?do
300
318
Mix.shell().yes?(
301
-
"A background color at the body could cause issues with the backpex app_shell. Do you want to remove it? See: https://hexdocs.pm/backpex/installation.html#remove-default-background-color"
319
+
"A background color at the body could cause issues with the backpex app_shell component. Do you want to remove it? See: https://hexdocs.pm/backpex/installation.html#remove-default-background-color"
0 commit comments