View Source mix exinertia.install (exinertia v0.8.2)

Installs Exinertia and updates your project accordingly.

This installer automates the basic steps for integrating Exinertia into a Phoenix project using bun for JavaScript and CSS bundling, removing esbuild/tailwind configs, and adding a simple Inertia setup.

It follows the rough steps:

  1. Create a Vite manifest reader in your Web app folder.
  2. Add Inertia and bun to your mix.exs, remove esbuild/tailwind if present, and run deps.get.
  3. Update config.exs to configure bun.
  4. Update dev.exs watchers to point to bun and remove esbuild/tailwind watchers.
  5. Modify your router and add an :inertia pipeline + a test route.
  6. Modify a controller to render an Inertia page.
  7. Create an inertia_root.html.heex layout.
  8. Modify the existing root.html.heex to reference your new Vite manifest for main.js.
  9. Insert Inertia imports into lib/myapp_web.ex for your controllers/templates.
  10. Update mix aliases for building/deploying assets with bun.
  11. Clone the Inertia.js template from nordbeam/exinertia-templates
  12. Install frontend dependencies with bun
  13. Configure Tailwind content paths for JavaScript files

Example

mix exinertia.install