Search documentation of phoenix_kit

# PhoenixKit.Install.AssetRebuild (phoenix_kit v1.7.87)

Copy Markdown View Source

Handles asset rebuilding for PhoenixKit installations and updates.

This module provides asset rebuilding using the standard Phoenix asset pipeline. It tries multiple build commands in order of preference:

1. `mix assets.build` - Phoenix 1.8+ standard asset pipeline
2. `mix esbuild default --minify` - Individual ESBuild compilation
3. `mix tailwind default --minify` - Individual Tailwind compilation
4. `npm run build` - NPM build script fallback
5. `npm run build.css` - NPM CSS build script fallback

Assets are always rebuilt to ensure consistency after PhoenixKit updates.

## Summary

### Functions

check_and_rebuild(opts \\ [])

Executes asset rebuilding using standard Phoenix asset pipeline.

## Functions

# check_and_rebuild(opts \\ [])

Executes asset rebuilding using standard Phoenix asset pipeline.

## Options

- `:verbose` - Show detailed output (default: true)

## Returns

- `:rebuild_completed` - Assets were successfully rebuilt
- `:rebuild_failed` - Asset rebuild failed (non-critical)