UNPKG

astro

Version:

Astro is a modern site builder with web best practices, performance, and DX front-of-mind.

20 lines (19 loc) 624 B
import { createDebug, enable as obugEnable } from "obug"; const debuggers = {}; function debug(type, ...messages) { const namespace = `astro:${type}`; debuggers[namespace] = debuggers[namespace] || createDebug(namespace); return debuggers[namespace](...messages); } globalThis._astroGlobalDebug = debug; function enableVerboseLogging() { obugEnable("astro:*,vite:*"); debug("cli", '--verbose flag enabled! Enabling: DEBUG="astro:*,vite:*"'); debug( "cli", 'Tip: Set the DEBUG env variable directly for more control. Example: "DEBUG=astro:*,vite:* astro build".' ); } export { enableVerboseLogging };