Raxol.Style.Colors.HotReload (Raxol v0.2.0)
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.
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
.
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