Expand description
[[hooks]] runner - executes an app’s declared prebuild / prerun
build/setup commands. See config::HookCfg for the schema.
[[hooks]] runner: executes an app’s declared build/setup commands at the
prebuild and prerun trigger points.
The schema and field reference live on crate::config::HookCfg; this
module is the execution side: filtering by [HookCfg::when] and the
current OS, skipping a hook whose declared outputs are already newer than
its declared inputs, and running the rest in declaration order.
Callers (the lumenc CLI’s run / build / bundle commands) decide
when to call [run_hooks]; lumenc check never does, so a check stays
side-effect free.
Re-exports§
Enums§
- Hook
Error - A
[[hooks]]command failed.
Functions§
- run_
hooks - Run every hook in
hookswhosewhenmatchestriggerand whoseos(if set) matchesstd::env::consts::OS, in declaration order, with the child process’s cwd set todir(the app directory). A hook whose declared outputs are all at least as new as its declared inputs is skipped; see [is_stale_free]. A hook that exits non-zero aborts the run immediately - later hooks do not run.