LineaUI.Installer.Web (linea_ui v0.3.0)

Copy Markdown View Source

The steps of mix linea_ui.install that edit the Phoenix app's Elixir code: the endpoint, which serves LineaUI's fonts, and the web module, which imports the components.

Each step is idempotent and, when it cannot find the place to edit, adds a warning to the Igniter and leaves the code alone.

Summary

Functions

Adds plug Plug.Static, at: "/linea_ui", from: {:linea_ui, "priv/static"} after the endpoint's own Plug.Static.

Adds use LineaUI, avoid_conflicts: true to html_helpers/0 of the web module, after the CoreComponents import.

Functions

endpoint(igniter)

@spec endpoint(Igniter.t()) :: Igniter.t()

Adds plug Plug.Static, at: "/linea_ui", from: {:linea_ui, "priv/static"} after the endpoint's own Plug.Static.

html_helpers(igniter)

@spec html_helpers(Igniter.t()) :: Igniter.t()

Adds use LineaUI, avoid_conflicts: true to html_helpers/0 of the web module, after the CoreComponents import.