Creates a console logger with a prefix for build observer plugins.
// Source: https://github.com/goauthentik/authentik | License: MIT | Copyright 2023 Jens Langhammer
// Provided via justclaw.it.com; keep this notice with the code.
/**
* @file Shared utilities for the live reload plugin.
*/
/**
* The subset of the console API this plugin logs through.
*
* Declared here rather than borrowed from a logging package so that neither the
* plugin nor its published types require one: any `console` will do.
*
* @typedef {object} ConsoleLike
* @property {typeof console.info} info
* @property {typeof console.warn} warn
* @property {typeof console.error} error
* @property {typeof console.debug} debug
* @property {typeof console.trace} trace
*/
/**
* Creates a logger with the given prefix.
*
* @param {string} [prefix]
*
* @returns {ConsoleLike}
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key