Ithibati.Web.Hooks (Ithibati v0.1.0)

Copy Markdown View Source

The colocated route for Ithibati's JavaScript.

An application whose bundler resolves phoenix-colocated imports the hooks from phoenix-colocated/ithibati and needs no path into deps/. The alternative is to import priv/static/ithibati.js directly; Registering and signing in shows both.

The hook body re-exports the client code rather than repeating it, so the two routes cannot disagree about what a ceremony does. A test reads both files and holds them to the same name, because a hook registered under the wrong name does not fail, it never mounts.