hey-console
v0.1.1
Published
A tiny, extensible console banner easter egg for your website's devtools — bring your own name, or use a built-in preset.
Maintainers
Readme
hey-console
A tiny, extensible console banner easter egg for your website's devtools. Pick a built-in preset by name, override any part of it, or bring your own banner entirely.
============================================================
_____ ___ __ __ __ ____ __
|_ _/ _ \| \/ | \/ \ \ / /
| || | | | |\/| | |\/| |\ V /
| || |_| | | | | | | | | |
|_| \___/|_| |_|_| |_| |_|
============================================================Install
npm install hey-consoleUsage (framework-agnostic)
import { logConsoleBanner } from "hey-console";
logConsoleBanner("tommy");
logConsoleBanner("nana", { url: "https://example.com" });
logConsoleBanner({
art: "...",
color: "#00ffcc",
message: "hi",
url: "https://example.com",
});Usage (React / Next.js)
import { ConsoleBanner } from "hey-console/react";
export default function RootLayout({ children }) {
return (
<html>
<body>
<ConsoleBanner name="tommy" />
{children}
</body>
</html>
);
}By default <ConsoleBanner /> only fires when NODE_ENV === "production". Pass enabled to override.
Built-in presets
| name | who |
| ------- | ---------------------------- |
| tommy | huangyanming.com |
| nana | anc-13.com |
Want your own preset added? Open a PR adding an entry to src/presets.ts.
Development
npm install
npm run build # builds dist/ with tsup (ESM + CJS + .d.ts)
npm run typecheckLicense
MIT
