Skip to content

Commit

Permalink
feat(v2): make update notifier work on first run
Browse files Browse the repository at this point in the history
  • Loading branch information
teikjun committed Jul 10, 2020
1 parent e840770 commit 4dc8560
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/docusaurus/bin/docusaurus.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ const notifier = updateNotifier({
distTag: 'next', // compare with the version that is tagged 'next' on npm
});

// allow the user to be notified for updates on the first run
if (notifier.lastUpdateCheck === Date.now()) {
notifier.lastUpdateCheck = 0;
}

if (notifier.update && notifier.update.current !== notifier.update.latest) {
const boxenOptions = {
padding: 1,
Expand Down

0 comments on commit 4dc8560

Please sign in to comment.