Handles router integration for PhoenixKit installation.
This module provides functionality to:
- Find and validate Phoenix router modules
- Add PhoenixKit imports and routes to routers
- Generate demo page routes
- Handle router integration warnings and notices
Summary
Functions
Adds PhoenixKit integration to the Phoenix router.
Verifies and fixes the position of phoenix_kit_routes() in the router.
Functions
Adds PhoenixKit integration to the Phoenix router.
Parameters
igniter- The igniter contextcustom_router_path- Custom path to router file (optional)
Returns
Updated igniter with router integration or warnings if router not found.
Verifies and fixes the position of phoenix_kit_routes() in the router.
During updates, checks if phoenix_kit_routes() is positioned AFTER catch-all routes (/:param or /*path patterns) and automatically moves it BEFORE them.
Parameters
igniter- The igniter contextcustom_router_path- Custom path to router file (optional)
Returns
Updated igniter with router position fixed or unchanged if already correct.