npm.io
0.1.0 • Published 5 years ago

@hyrious/version

Licence
MIT
Version
0.1.0
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
1

@hyrious/version

Usage

import { version } from "@hyrious/version";
version();
// if process.argv.includes('--version'), print version and exit
node ./bin.js --version
0.1.0

Configuration

import { version } from "@hyrious/version";
// manually set version number instead of infering from package.json.
version("0.1.0");
// get version number from another place, you can use async function here.
version(() => JSON.parse(fs.readFileSync(__dirname + "/package.json", "utf8")).version);
License

MIT @ hyrious

Keywords