mix phoenix_kit_legal.install (PhoenixKitLegal v0.1.3)

Copy Markdown View Source

Installs PhoenixKitLegal into a Phoenix application.

Automatically patches three files in the host application:

  1. lib/**/endpoint.ex — adds Plug.Static to serve consent JS assets
  2. assets/css/app.css — adds Tailwind @source for legal component classes
  3. assets/js/app.js — adds consent JS import (side-effect IIFE)

Routes are wired automatically via phoenix_kit_routes(). Migrations run via mix phoenix_kit.update.

Usage

mix phoenix_kit_legal.install

This task is idempotent — safe to run multiple times.