imochen / update-notice

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

update-notice

Update notifications for CLI.

screenshot

Install

npm install update-notice --save

Usage

const updateNotice = require('update-notice');
const pkg = require('./package.json');

const notice = updateNotice({
  pkg,
  options: {
    registry: 'https://registry.npmjs.org', //set your own registry
    isSudo: true, // default false
    isGlobal: true, // default false
  },
});

notice.notify();

// notice.notify((chalk) => {
//   return 'Changelog ' + chalk.underline('/path/to/CHANGELOG.md');
// });

About


Languages

Language:JavaScript 100.0%