UNPKG

vike

Version:

The Framework *You* Control - Next.js & Nuxt alternative for unprecedented flexibility and dependability.

16 lines (15 loc) 491 B
export { isVikeCli }; export { setContextCliCommand }; export { getCliOptions }; import { assert, getGlobalObject } from './utils.js'; const globalObject = getGlobalObject('cli/context.ts', {}); function getCliOptions() { return globalObject.cliCommand?.cliOptions ?? null; } function isVikeCli() { return !!globalObject.cliCommand; } function setContextCliCommand(command, cliOptions) { assert(!globalObject.cliCommand); globalObject.cliCommand = { command, cliOptions }; }