Installs Flicker into a Phoenix app.
Recommended installation
mix igniter.install flickerThis fetches Flicker as a dependency and then runs this task.
What it does
- Adds
:flickerto the formatter'simport_deps, somix formatpicks up Flicker'sFlicker.select/1call formatting. - Adds a
config :flicker, default_limit: ..., default_debounce: ...block toconfig/config.exs— only the keys not already configured. - Wires the keyboard-nav colocated hook into
assets/js/app.jsusingigniter_js's AST codemods: animport {hooks as flickerHooks} from "phoenix-colocated/flicker"and a...flickerHooksspread merged into theLiveSockethooksoption, alongside the host's own colocated hooks.
If step 3 can't parse your app.js or find a LiveSocket (a
hand-rolled bundler setup, for instance), a notice with the two manual
edits is printed instead of failing.
- Registers Flicker's templates as a Tailwind source so its utility
classes aren't purged. On a Tailwind v4 setup (an
@import "tailwindcss"inassets/css/app.css) this adds an@source "../../deps/flicker";directive; on a v3 setup (acontent: [...]array inassets/tailwind.config.js) it adds a"../deps/flicker/**/*.*ex"glob to that array.
If neither is found, a notice with the manual edit is printed instead.
Pass --daisyui to also add a @plugin "daisyui"; directive to a
Tailwind v4 app.css, for hosts using Flicker.Theme.daisy_ui(). Off
by default — daisyUI is an opt-in preset, not a Flicker requirement.