1.0.6 • Published 5 years ago

update-notifier2 v1.0.6

Weekly downloads
2
License
BSD-2-Clause
Repository
github
Last release
5 years ago

这是从 update-notifier fork 过来的项目,主要是增加了可以从 updateNotifier 中指定 registry 的能力,同时增加了可以修改 installCommand message 的能力,避免通过 message 参数全盘覆盖输出的 update 信息。

安装

npm install update-notifier -S
  • 指定 registry
updateNotifier({
  pkg,
  registryUrl: 'http://npm.example.com',
})
  • 覆盖升级安装信息
updateNotifier({
  pkg
}).notify({
  installCommand: `cnpm i -g ${pkg.name} --registry=${registryUrl}`,
})

其他使用请参考 update-notifier 的文档:https://www.npmjs.com/package/update-notifier