Build hooks
Hooks let a project orchestrate work around Sklair's compiler without moving the compiler itself into Lua. It is different from inline Lua, which is for logic inside component instances.
Pre-build hooks prepare inputs, generated assets, and generated-document requests. Post-build hooks inspect or adjust completed output.
Configure a hooks directory, then place .lua files in its pre and post subdirectories:
hooks/
├── pre/
│ └── 10-documents.lua
└── post/
└── 10-manifest.lua
Files execute alphabetically within each phase. Numeric prefixes are a convenient way to show the order in which these hooks run.
See Lua environment for execution scopes, standard libraries, diagnostics, and exit handling. Globals do not leak from one hook file into the next. Filesystem lists the permissions available in each phase.