-
-
Notifications
You must be signed in to change notification settings - Fork 372
Adds update-notifier #361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds update-notifier #361
Conversation
|
Don't know how to test it locally lol 😛 Hoping that it will work 😅 |
src/index.js
Outdated
| import pkg from '../package.json'; | ||
| import logo from './lib/logo'; | ||
| import checkVersion from './../check'; | ||
| import updateNotifier from 'update-notifier'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this to line 2, so that it precedes all the local imports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Didn't think about this earlier.
src/index.js
Outdated
| .strict() | ||
| .argv; | ||
|
|
||
| updateNotifier({pkg}).notify({ defer: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be before all the yargs(...) stuff takes place -- aka, right after the checkVersion().
Also, we don't need defer:true --- it's true by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
src/index.js
Outdated
|
|
||
| installHooks(); | ||
|
|
||
| updateNotifier({pkg}).notify({ defer: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can remove defer:true because it is already the default. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! shoot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 🙏
This adds update notifier to the CLI and reminds the user on every CLI command her runs.
/cc @developit