Consistent update notifications for packages
$ cnpm install @zeit/check-updates
This package makes it very easy to implement update notifications into ZEIT packages:
Firstly, install the package:
npm install @zeit/check-updates
Next, initialize it:
const pkg = require('./package')
const updateNotifier = require('@zeit/check-updates')
updateNotifier(pkg, 'Project Name')
You can even pass a millisecond interval for the cache (a day by default):
updateNotifier(pkg, 'Project Name', 80000)
npm linknpm link @zeit/check-updates. Instead of the default one from npm, node will now use your clone.Leo Lamprecht (@notquiteleo) - ZEIT
Copyright 2013 - present © cnpmjs.org | Home |