mix shadix.add (shadix v0.0.1)

Copy Markdown View Source

Copies one or more Shadix components into your Phoenix application, rewriting Shadix.* module namespaces to match your app.

Usage

mix shadix.add button card alert

Options

  • --namespace — target base module namespace (default: <AppModule>Web.Components.UI)
  • --dir — target directory to write files into (default: lib/<underscored_namespace>)
  • --hooks-dir — target directory for JS/TS LiveView hook files (default: assets/js/hooks)
  • --force — overwrite existing files (default: false, skip existing)

What it does

  1. Resolves transitive dependencies (e.g. button pulls in cn)
  2. Rewrites Shadix.Components<namespace> and Shadix.Cn<namespace>.Cn
  3. Writes files to the target directory
  4. Prints a summary and a reminder to run mix shadix.init if not done yet