(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-serverprocedureConstruct a dev-server struct.
dev-server?procedureTest if a value is a dev-server struct.
dev-server-configprocedureGet the config field of a dev-server struct.
dev-server-pipelineprocedureGet the pipeline field of a dev-server struct.
dev-server-portprocedureGet the port field of a dev-server struct.
dev-server-output-dirprocedureGet the output-dir field of a dev-server struct.
dev-server-source-dirsprocedureGet the source-dirs field of a dev-server struct.
dev-server-poll-intervalprocedureGet the poll-interval field of a dev-server struct.
find-files-in-dirsprocedureFind all files in the given directories.
Returns a flat list of file paths, skipping hidden files/directories.
dev-reload-scriptprocedureReturn 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.
dev-server-startprocedureStart 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.
dev-server-stopprocedureStop the development server.