vike
Version:
The Framework *You* Control - Next.js & Nuxt alternative for unprecedented flexibility and dependability.
18 lines (17 loc) • 630 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isVikeCli = isVikeCli;
exports.setContextCliCommand = setContextCliCommand;
exports.getCliOptions = getCliOptions;
const utils_js_1 = require("./utils.js");
const globalObject = (0, utils_js_1.getGlobalObject)('cli/context.ts', {});
function getCliOptions() {
return globalObject.cliCommand?.cliOptions ?? null;
}
function isVikeCli() {
return !!globalObject.cliCommand;
}
function setContextCliCommand(command, cliOptions) {
(0, utils_js_1.assert)(!globalObject.cliCommand);
globalObject.cliCommand = { command, cliOptions };
}