Skip to content

API Reference / @gtkx/codegen / runCodegen

Variable: runCodegen

const runCodegen: (options) => Promise<CodegenRunnerResult>

Defined in: codegen/dist/runner.d.ts:55

Writes and links a project's @gtkx/gi and @gtkx/jsx stores from the given GObject-Introspection libraries. The gi store is rewritten only when its GIR inputs changed, and the jsx store only when the gi store or the React element config changed, unless options.isForced is set. Pass the spread of resolveStore(projectRoot) for everything but libraries and girPath.

Parameters

options

CodegenRunnerOptions

What to generate and where to write it.

Returns

Promise<CodegenRunnerResult>

A summary of what was regenerated and how long the run took.

Throws

If girPath is empty, which would otherwise generate nothing and report success.

Released under the MPL-2.0 License.