UNPKG

@roots/bud

Version:

Configurable, extensible build tools for modern single and multi-page web applications

23 lines (22 loc) 514 B
import makeContext, {} from '@roots/bud/context'; import * as instance from '@roots/bud/instance'; /** * Create a {@link Bud} instance programatically * * @example * ```ts * const bud = await factory() * ``` * * @example * Running in a particular mode: * * ```ts * const bud = await factory({mode: 'development'}) * ``` */ export async function factory(options = {}) { const bud = instance.get(); const context = await makeContext(options); return await bud.initialize({ ...context }); }