mix hakushi.install (Hakushi v0.6.0)

Copy Markdown View Source

Sets up Hakushi in a Phoenix application.

$ mix igniter.install hakushi

or, with Hakushi already in the deps, mix hakushi.install. Igniter shows each change as a diff and asks before it writes (--dry-run only shows them, --yes does not ask). Running the task again changes nothing.

  • assets/js/app.js imports the Hakushi hook and adds it to the hooks of the LiveSocket;
  • assets/css/app.css imports the canvas style sheet, and the Sumi theme as a comment;
  • the html_helpers of your web module import Hakushi.Components.

When a file is not there, or the task cannot edit it safely, it changes nothing in that file and tells you the lines to add. It does not edit config/config.exs: when the esbuild profile does not resolve hakushi through NODE_PATH, it tells you what to add.

Without Igniter in the app, mix hakushi.install makes the edits of the two asset files and prints each change as a diff.