API Reference / @gtkx/codegen / runCodegen
Function: runCodegen()
runCodegen(
options):Promise<CodegenRunnerResult>
Defined in: packages/codegen/src/runner.ts:86
Generates and links a project's GI and JSX stores from GObject Introspection libraries. Use resolveStore(projectRoot) for store locations and versions; omit jsx when it is null.
Parameters
options
Libraries, GIR paths, store locations, and generation settings.
Returns
Promise<CodegenRunnerResult>
Regenerated outputs and elapsed time.
Remarks
GI regenerates when its inputs change; JSX regenerates when GI or element configuration changes. isForced bypasses freshness checks. Existing stores are linked before generation, restoring links removed during dependency installation even when regeneration is unnecessary.
Throws
If girPath is empty.