update-notifier2

1.0.6 • Public • Published

这是从 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

Package Sidebar

Install

npm i update-notifier2

Weekly Downloads

68

Version

1.0.6

License

BSD-2-Clause

Unpacked Size

9.17 kB

Total Files

5

Last publish

Collaborators

  • huruji