Skip to content

Mimexe/mime-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

527 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

MIT License Node.js CI

Mime Logger

A simple logger for Mime, used by all his projects.

Installation

Install mime-logger with your package manager of your choice.

  npm install mime-logger
  yarn add mime-logger
  pnpm install mime-logger

Documentation

Online documentation can be found here

Simple usage

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!");

Development & Publishing

Prerequisites

This project uses Bun as its package manager and build tool. Make sure you have Bun installed:

curl -fsSL https://bun.sh/install | bash

Building the Project

To build the project:

bun run build

This will:

  • Clean the dist directory
  • Compile TypeScript to JavaScript (ESM and CJS)
  • Generate type definitions

Running Tests

bun test

Publishing to npm

The project is configured to automatically build before publishing. To publish a new version:

  1. 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
  2. Publish to npm:

    npm publish

    The prepublishOnly script will automatically run bun run build before publishing.

  3. Push the version tag:

    git push && git push --tags

Publishing Checklist

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

License

MIT

About

Simple logger for Mime projects

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors