Sayfa.DevServer.Watcher (Sayfa v0.5.0)

Copy Markdown View Source

GenServer that watches the filesystem for content changes.

Uses the :file_system library to monitor content, theme, and config directories. When a relevant file changes, triggers a rebuild via Sayfa.DevServer.Rebuilder.

Summary

Functions

Returns a specification to start this module under a supervisor.

Starts the watcher.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

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

Starts the watcher.

Options

  • :dirs — list of directories to watch