get-current-version
Get the version of the currently executing bin.
Last updated 2 years ago by fabiospampinato .
Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install get-current-version 
SYNC missed versions from official npm registry.

Get Current Version

Get the version of the currently executing bin.

This is meant to be used in combination with tiny-updater or similar, in order to get the version of the currently executing bin very conveniently, without importing a "package.json" and without hard-coding the version number yourself.

Install

npm install --save get-current-version

Usage

You should have something like this in your bin app:

import getCurrentVersion from 'get-current-version';

console.log ( getCurrentVersion () ); // 1.0.0

Then executing the bin would produce this:

> my-bin
< 1.0.0

Basically it detects which entrypoint file is being executed and retrieves its version.

License

MIT © Fabio Spampinato

Current Tags

  • 1.0.1                                ...           latest (2 years ago)

2 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (3)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |