mix mishka.ui.uninstall (Mishka Chelekom v0.0.10)

Copy Markdown View Source

A Mix Task for uninstalling Mishka Chelekom components

This task safely removes components while handling shared dependencies like JavaScript hooks. When multiple components share the same JS hook, it will only be removed when the last component using it is uninstalled.

This task respects module_prefix configuration and cleans up import macro files, CSS files, and config files when using the appropriate flags.

Example

mix mishka.ui.uninstall accordion

Options

  • --all or -a - Remove all installed Mishka components. Without --headless or --mob this removes both styled and headless components; combine with either flag to remove only that kind.
  • --headless - Target headless components (lib/<app>_web/components/headless/) instead of styled ones, e.g. mix mishka.ui.uninstall accordion --headless.
  • --mob - Target native Mob components (lib/<app>/components/), e.g. mix mishka.ui.uninstall drawer --mob. A Mob app has no _web namespace, no JS hooks and no stylesheet, so the JS, npm, CSS and import-macro steps are skipped; instead the composite-tag registry (lib/<app>/components.ex) is rewritten so it never names a module that was just deleted, and the removed tags leave config :mob, :extra_tags (the rest of that list is kept).
  • --dry-run or -d - Preview what would be removed without making changes
  • --yes - Skip confirmation prompts
  • --force or -f - Force removal even if other components depend on it
  • --include-css - Also remove CSS files (only with --all)
  • --include-config - Also remove the config file (only with --all)
  • --keep-js - Keep JavaScript files even if no components use them
  • --verbose or -V - Show detailed output of all operations

Summary

Functions

apply_cascade_choice(igniter, atom, dependent_components)

igniter(igniter)

Callback implementation for Igniter.Mix.Task.igniter/1.