A simple logger for Mime, used by all his projects.
Install mime-logger with your package manager of your choice.
npm install mime-logger yarn add mime-logger pnpm install mime-loggerOnline documentation can be found here
import Logger from "mime-logger"; // For ESM
const logger = new Logger();
logger.info("Hello, world!");const { MimeLogger } = require("mime-logger"); // For CommonJS
const logger = new MimeLogger();
logger.info("Hello, world!");This project uses Bun as its package manager and build tool. Make sure you have Bun installed:
curl -fsSL https://bun.sh/install | bashTo build the project:
bun run buildThis will:
- Clean the
distdirectory - Compile TypeScript to JavaScript (ESM and CJS)
- Generate type definitions
bun testThe project is configured to automatically build before publishing. To publish a new version:
-
Update the version in
package.json:# For patch releases (bug fixes) npm version patch # For minor releases (new features, backwards compatible) npm version minor # For major releases (breaking changes) npm version major
-
Publish to npm:
npm publish
The
prepublishOnlyscript will automatically runbun run buildbefore publishing. -
Push the version tag:
git push && git push --tags
Before publishing, ensure:
- All tests pass (
bun test) - The build succeeds (
bun run build) - GitHub Actions CI is passing
- CHANGELOG.md is updated (if applicable)
- Version number follows semantic versioning
