mix live_svelte_gettext.install (LiveSvelteGettext v0.2.0)

View Source

Installs LiveSvelteGettext in your Phoenix application.

Usage

$ mix igniter.install live_svelte_gettext

This installer will:

  1. Detect your Gettext backend automatically
  2. Detect your Svelte directory (or prompt if multiple found)
  3. Create a SvelteStrings module with the correct configuration
  4. Add import LiveSvelteGettext.Components to your web module
  5. Add application configuration to config/config.exs
  6. Provide next steps for completing the installation

Options

  • --gettext-backend - Manually specify the Gettext backend module (e.g., MyAppWeb.Gettext)
  • --svelte-path - Manually specify the Svelte directory path (e.g., assets/svelte)
  • --module-name - Specify the name for the SvelteStrings module (default: detected from Gettext backend)

Examples

# Automatic detection
$ mix igniter.install live_svelte_gettext

# Manual configuration
$ mix igniter.install live_svelte_gettext --gettext-backend MyAppWeb.Gettext --svelte-path assets/svelte

After Installation

You can optionally install the npm package or use the bundled files:

# Option A: Install from npm (recommended)
npm install live-svelte-gettext

# Option B: Use bundled files (no installation needed)
# Available at deps/live_svelte_gettext/assets/dist/