Skip to content

Latest commit

History

History
27 lines (20 loc) 路 1.06 KB

README.md

File metadata and controls

27 lines (20 loc) 路 1.06 KB

Upgradable

"Upgradable" runs in a background child process and checks for updates in your CLI package. If there's a new version available - at end of interaction, when user sends interrupt signal (ctrl+c), it will prompt your users to upgrade your node CLI tool.

Use

const upgradable = require('upgradable');
const { name, version } = require('./package.json');

upgradable({name, version});

Shorthand

require('upgradable')(require('./package.json'));

image

options

message (Optional)

upgradable({name, version, message: 'This is my own inspirational message'});

image