sigildocs

(sigil publish dev-server)

(sigil publish dev-server) - Development Server with Live Reload

Provides a development server that:

  • Serves the output directory
  • Watches source files for changes
  • Rebuilds on change using graph-based execution
  • Notifies browsers to reload via polling endpoint

Exports

dev-serverprocedure

Construct a dev-server struct.

dev-server?procedure

Test if a value is a dev-server struct.

Get the config field of a dev-server struct.

Get the pipeline field of a dev-server struct.

Get the port field of a dev-server struct.

Get the output-dir field of a dev-server struct.

Get the source-dirs field of a dev-server struct.

Get the poll-interval field of a dev-server struct.

Find all files in the given directories.

Returns a flat list of file paths, skipping hidden files/directories.

Return the JavaScript for live reload via polling.

This script is injected into HTML pages in dev mode. It polls the /__sigil-dev/version endpoint and reloads when changes are detected.

Start the development server.

Starts listening immediately, then performs initial build while serving a "building" page. After build completes, serves content and watches for changes. Uses graph-based execution for incremental rebuilds.

Stop the development server.