Skip to main content

Function: createCompileContext()

Constructs a CompileContext instance wired with filesystem adapters.

Param

A fully-resolved SpecdConfig or an explicit context object

Param

Filesystem path options; required when configOrContext is a context object

Call Signature

createCompileContext(config, kernelOpts?): CompileContext

Defined in: packages/core/src/composition/use-cases/compile-context.ts:64

Constructs a CompileContext use case wired to all configured workspaces.

Parameters

config

SpecdConfig

The fully-resolved project configuration

kernelOpts?

Optional kernel-level overrides

extraNodeModulesPaths?

readonly string[]

Additional node_modules paths for schema resolution

Returns

CompileContext

The pre-wired use case instance

Call Signature

createCompileContext(context, options): CompileContext

Defined in: packages/core/src/composition/use-cases/compile-context.ts:75

Constructs a CompileContext use case with explicit context and options.

Parameters

context

CompileContextWorkspace

Domain context for the primary workspace

options

FsCompileContextOptions

Filesystem paths and pre-built spec repositories

Returns

CompileContext

The pre-wired use case instance