publish-version-checker
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

自动站点更新检测脚本

npm install publish-version-checker
or
yarn add publish-version-checker
import VersionChecker from 'publish-version-checker'

new VersionChecker({
  onUpdate: (done) => {
    const res = confirm('检测到新版本,是否要更新')
    if (res) {
      done(true)
      window.location.reload()
    } else {
      done(false)
    }
  }
})

Package Sidebar

Install

npm i publish-version-checker

Weekly Downloads

2

Version

1.0.7

License

MIT

Unpacked Size

25.8 kB

Total Files

12

Last publish

Collaborators

  • yokochen