Skip to main content
Version: Next

OnBootstrap

onBootstrap

Registers a bootstrap hook that will be called when the CommandKit instance is created. This is useful for plugins that need to run some code after the CommandKit instance is fully initialized. Note that not all commandkit dependiencs are available at this point. It is recommended to use the onApplicationBootstrap hook instead, if you need access to the commandkit dependencies.

Example

import { onBootstrap } from 'commandkit';

onBootstrap(async (commandkit) => {
// Do something with the commandkit instance
})
Signature
function onBootstrap<F extends BootstrapFunction>(fn: F): void

Parameters

fn

parameter
F