WP Kernel API / @wpkernel/cli / PrinterContext
Interface: PrinterContext
Properties
ir
ts
ir: IRv1;
outputDir
ts
outputDir: string;
configDirectory?
ts
optional configDirectory: string;
Absolute path to the directory containing the active kernel config. When omitted the printers fall back to the directory inferred from the IR metadata source path relative to the current working directory.
formatPhp()
ts
formatPhp: (filePath, contents) => Promise<string>;
Parameters
filePath
string
contents
string
Returns
Promise
<string
>
formatTs()
ts
formatTs: (filePath, contents) => Promise<string>;
Parameters
filePath
string
contents
string
Returns
Promise
<string
>
writeFile()
ts
writeFile: (filePath, contents) => Promise<void>;
Parameters
filePath
string
contents
string
Returns
Promise
<void
>
ensureDirectory()
ts
ensureDirectory: (directoryPath) => Promise<void>;
Parameters
directoryPath
string
Returns
Promise
<void
>
phpAdapter?
ts
optional phpAdapter: PhpAdapterConfig;
adapterContext?
ts
optional adapterContext: AdapterContext & object;
Type Declaration
ir
ts
ir: IRv1;