Skip to content

Lightweight utility for retrieving the version of globally installed npm packages, such as yeoman generators

License

Notifications You must be signed in to change notification settings

swellaby/get-package-version

Repository files navigation

get-package-version

Lightweight utility for retrieving the version of globally installed npm packages

npm Version Badge npm Downloads Badge License Badge

Linux CI Badge Mac CI Badge Windows CI Badge

Test Results Badge Coverage Badge Sonar Quality Gate Badge

Feature Completion Notice

Please note that we consider this package to be feature complete. We will continue to maintain and support this package by fixing any bugs discovered, updating dependency versions, etc. We will also consider PRs/Enhancement requests, but we do not have additional development activities planned at this time.

CLI

Install the package globally:

npm install -g get-pkg-version

Use it to retrieve a package version like this:

get-pkg-version <pkg-name>

For example: get-pkg-version get-pkg-version

API

Install the package into your project:

npm install --save get-pkg-version

Just call the function with the name of the package you want the get the version of:

import getPackageVersion = require('get-pkg-version');

getPackageVersion('package-name-you-want-version-of').then((version) => {
  console.log(version);
});

Initially created by this swell generator!

About

Lightweight utility for retrieving the version of globally installed npm packages, such as yeoman generators

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published