A Node utility for automatically generating properly formatted calver version numbers.
Will return a string with a calver version number for today's date, with no leading zeros on the month or day fields (on applicable dates).
# Install the autocalver package globally if you'd like to use it as a shell command.
npm install -g autocalver
# Install it locally if you'd like to use it as a Node package.
# ...or as locally-available executable. Whatever, it's 2009!
npm install --save autocalverIf you would like to run autocalver as a Node package (i.e. within a JS file):
const autocalver = require('autocalver')
const calverNumber = autocalver()
console.log(calverNumber)
// => calver number!Use Javascript's Date constructor to create a Date object with your desired date, and pass this to autocalver:
const autocalver = require('autocalver')
const dateObj = new Date('1955-11-5')
const calverNumber = autocalver(dateObj)
console.log(calverNumber)
// => 1955.11.5This feature is not available for the shell script ... yet. Maybe you could implement it in a PR? 🙃
autocalver can also be run as a shell script. You can call the shell command anywhere in your filesystem if you have installed the package globally, although the command will only be available locally to your specific node project if you have installed it locally.
# invoke the script thusly:
autocalver
# => calver number!