Installation
Logluxe can be installed using any package manager. It has zero dependencies and works in any JavaScript/TypeScript environment.
Package Managers
npm
npm install logluxe
Terminal
added 1 package in 2s
Yarn
yarn add logluxe
Terminal
✔Done in 1.8s
pnpm
pnpm add logluxe
Terminal
Packages: +1
✔Done in 1.2s
Bun
bun add logluxe
Terminal
bun add v1.0.0
installed logluxe@latest
✔Done in 0.3s
CDN (Browser)
For quick prototyping or browser-only usage, you can use a CDN:
<!-- ESM -->
<script type="module">
import log from 'https://esm.sh/logluxe';
log.success('Hello from CDN!');
</script>
<!-- UMD (exposes global `logluxe`) -->
<script src="https://unpkg.com/logluxe/dist/index.cjs"></script>
<script>
logluxe.success('Hello from UMD!');
</script>
Browser Console
✔✔ Hello from CDN!
✔✔ Hello from UMD!
Deno
import log from 'npm:logluxe';
log.success('Hello from Deno!');
Deno Output
✔✔ Hello from Deno!
Or with import maps in deno.json:
{
"imports": {
"logluxe": "npm:logluxe"
}
}
Verify Installation
After installing, verify it works:
import log from 'logluxe';
log.success('Logluxe installed successfully!');
log.info('Ready to use');
Output
✔✔ Logluxe installed successfully!
ℹℹ Ready to use
🎮 Try it yourself
TypeScript Configuration
Logluxe is written in TypeScript and ships with complete type definitions. No additional @types/* packages are needed.
For best results, ensure your tsconfig.json has:
{
"compilerOptions": {
"moduleResolution": "bundler", // or "node16", "nodenext"
"esModuleInterop": true
}
}
Module Formats
Logluxe supports both ESM and CommonJS:
ESM (Recommended)
import log from 'logluxe';
import { createLogger, colorize } from 'logluxe';
CommonJS
const log = require('logluxe').default;
const { createLogger, colorize } = require('logluxe');
Bundle Size
Logluxe is designed to be lightweight:
| Format | Size (minified) | Size (gzip) |
|---|---|---|
| ESM | ~18 KB | ~5 KB |
| CJS | ~18 KB | ~5 KB |
| Patch | ~6 KB | ~2 KB |
The package is fully tree-shakable, so if you only import specific functions, your bundle will be even smaller.
Environment Support
| Environment | Support | Notes |
|---|---|---|
| Node.js 16+ | ✅ Full | ANSI colors |
| Node.js 18+ | ✅ Full | Recommended |
| Bun | ✅ Full | Native support |
| Deno | ✅ Full | Use npm: prefix |
| Chrome | ✅ Full | CSS console styles |
| Firefox | ✅ Full | CSS console styles |
| Safari | ✅ Full | CSS console styles |
| Edge | ✅ Full | CSS console styles |
Next: Quick Start Guide →