Raxol.Style.Colors.HotReload (Raxol v2.0.1)
View SourceProvides hot-reloading capabilities for color themes.
This module watches for changes to theme files and automatically reloads them when they change. It also provides a way to subscribe to theme change events.
Summary
Functions
Returns a specification to start this module under a supervisor.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Subscribe to theme change events.
Unsubscribe from theme change events.
Add a path to watch for theme changes.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Callback implementation for Raxol.Core.Behaviours.BaseManager.handle_manager_cast/2.
Subscribe to theme change events.
Examples
iex> HotReload.subscribe()
:ok
Unsubscribe from theme change events.
Examples
iex> HotReload.unsubscribe()
:ok
Add a path to watch for theme changes.
Parameters
path- The path to watch
Examples
iex> HotReload.watch_path("/path/to/themes")
:ok