Search documentation of Plushie

# Plushie.Dev.DevServer (Plushie v0.7.2)

Copy Markdown View Source

File watcher and recompiler for dev-mode live reload.

Watches compilation directories for `.ex` and `.exs` changes, recompiles, and tells the runtime to re-render. The UI updates without losing application state.

When native widgets are detected (via `Plushie.WidgetRegistry`), also watches their Rust crate directories for `.rs` and `Cargo.toml` changes. On change, runs `cargo build` via a Port, streams output to the dev overlay, and restarts the renderer on success.

By default, watches all directories in `elixirc_paths` (e.g. `lib/` and `examples/` in dev). Override with the `:dirs` option.

Requires the `:file_system` package. Started automatically when `config :plushie, code_reloader: true` is set, or via start_link:

    Plushie.Dev.DevServer.start_link(runtime: runtime_pid)

## Summary

### Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

start_link(opts)

Starts the dev server with the given options.

## Functions

# child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# start_link(opts)

    @spec start_link(opts :: keyword()) :: GenServer.on_start()

Starts the dev server with the given options.