-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
WIP refactor(saber): add node-notifier #514
Conversation
close 509
Deploy preview for saber ready! Built with commit 2dad224 |
@egoist |
Just add a comment here https://github.com/saberland/saber/blob/master/website/saber-node.js |
@@ -86,7 +88,7 @@ exports.apply = api => { | |||
) | |||
// Because you might also update webpack config in saber-node.js | |||
// Which we can't (?) automatically reload | |||
log.warn(`You probably need to restart the server.`) | |||
notifier.notify('You probably need to restart the server.') |
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.
we should also output warning in console
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.
Oops. Sorry.
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.
We should set Saber
as the title
@MarchWorks |
@tyankatsu0105 sorry, I got it wrong. There is no need for any test. |
We can also display the Saber logo in the notifier https://github.com/saberland/art/blob/master/icon/icon-alt.png |
The notifier should also be used for |
OK. notifier.notify({
title: 'Saber',
icon: path.join(__dirname, 'saber.jpg'),
message: 'You probably need to restart the server.'
})
|
You can put it inside |
We should make the message more detailed, like |
OK! |
@egoist |
What about including a button in the notification that allows restarting directly? |
That’s interesting. |
|
That would require Saber to be run in a child process, Next.js used to do this and auto-restart when config file is changed but it seems they removed this feature. |
Sorry, I don't know how to restart server :_( |
Oh. I just checked this comment.
Um, could you give me an example? |
@egoist |
@tyankatsu0105 check this PR #503 as an example of sending a notification to the browser. The difference is that you will have to send your own data from the development server and get it with eventSource |
This reverts commit 344deef.
I close this PR. Maybe |
Sorry that I couldn't be your help. :_( |
node-notifier
withyarn workspace
Write testNot requiredpackages/assets
Summary
close #509
What kind of change does this PR introduce? (check at least one)
If changing the UI/CSS related code, please provide the before/after screenshot:
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:
fix: rebuild when a page is added
To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.
Other information: