Raxol.Style.Colors.HotReload (Raxol v0.2.0)

View Source

Provides 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

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts \\ [])

subscribe()

Subscribe to theme change events.

Examples

iex> HotReload.subscribe()
:ok

unsubscribe()

Unsubscribe from theme change events.

Examples

iex> HotReload.unsubscribe()
:ok

watch_path(path)

Add a path to watch for theme changes.

Parameters

  • path - The path to watch

Examples

iex> HotReload.watch_path("/path/to/themes")
:ok