Skip to main content

themes

Function themes 

Source
pub fn themes(dir: impl AsRef<Path>)
Expand description

Write the themes makeover ships into dir, as <id>.toml.

Clears stale .toml files first, so a theme removed or renamed upstream does not linger in the bundle from an earlier build. That detail is the reason this is worth sharing rather than retyping: it is easy to omit and its absence shows up as a theme that will not go away.

ยงPanics

If the directory cannot be created, read, or written. A build script has nowhere useful to return an error to, and a half-materialised theme set is worse than a failed build.