Expand description
Bundle HTML, CSS, and JS/TS for prod or dev with live-reload.
- Prod build
src/intodist/with minification and hashed filenames, - Dev build
src/intodev/with sourcemaps, - Option to watch and build on change,
- Option to filter watched files by name or suffix,
- Option to serve the bundle.
Serving is optional: the serve feature is on by default, and
default-features = false builds without the axum dependency.
See the README for features, CLI, and library usage.
Structs§
- Build
Options - Build options for the HTML, CSS, JS/TS output.
- Minify
- Set of output targets to minify.
- Server
- Alias of
webadev::Server, re-exported from webadev. A bound server, ready to run.runstarts serving only when awaited, so theurlcan be shown first. - Server
Config - Alias of
webadev::Config, re-exported from webadev. Configuration for the server - Watch
- Headless watch handle returned by
watch.
Enums§
- Build
Cause - What triggered a build during watch.
- Reload
Type - Alias of
webadev::ReloadType, re-exported from webadev. How to reload a browser tab on file change - Watch
Log - A runtime log line from the watch loop, sent on the caller’s broadcast channel so the library never prints directly.
Functions§
- build
- Build the HTML, CSS, and JS/TS assets from
srcintodist. - serve
- Serve
config.dirwithout watching or building. Optionalconfig.baseprefix. - watch
- Watch
srcand build it intodiston startup and on every change, without serving. Headless: no server, no port, no browser. - watch_
serve - Watch and serve: