Skip to content

Gets info about current git version/branch/sha etc and caller package info

Notifications You must be signed in to change notification settings

idolgoff/meta-version

Repository files navigation

MetaVersion

MetaVersion: A lightweight, powerful Node.js module that provides real-time metadata about your git repository, build, and package. Enhance your debugging and monitoring experience, making your development process more efficient and informed.

Installation

Install the module with npm:

npm install meta-version --save-dev

Usage

First, import the module in your file:

const { metaVersion } = require('meta-version');

Then, call the metaVersion function:

const metadata = metaVersion();
console.log(metadata);

Function

The metaVersion function accepts an optional parameter:

  • projectRoot (string): The root directory of the project. Defaults to the current working directory.

Example

Here’s an example of how to use the module:

const { metaVersion } = require('meta-version');

const metadata = metaVersion('/path/to/your/project');
console.log(metadata);

In this example, the module will return the metadata about the git repository, build, and package of the project located at ‘/path/to/your/project’.

Happy coding!

About

Gets info about current git version/branch/sha etc and caller package info

Resources

Stars

Watchers

Forks

Packages

No packages published