-
Notifications
You must be signed in to change notification settings - Fork 3
Bounce should stay running after crash #2
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
base: master
Are you sure you want to change the base?
Conversation
|
I had it like this first. I suppose the only downside is that you don't always know if it's crashed. I suppose we could have a growl notification ? |
|
Growl would be great. Another option (if there are ambiguities) would be to provide this behavior as a command-line switch? My usecase is: if I'm editing some code, saving from time to time during the process, I have my jslint validator in Textmate already. I don't need bounce to tell me I'm missing a semicolon - I got that solved in my editor workflow. And I certainly don't want bounce to exit - thus forcing me to run it again. |
|
gotcha - so perhaps the command-line switches could work like: bounce -nodeOpt lib/servers -- -g -r -w src where the switches after a final |
|
Or would bounce -g -r -w "node -nodeOpt lib/server.js" be a better approach ? |
|
Or a third option would be to have in /usr/local/bin a symlink to bounce executable and check $0 on runtime: or perhaps check process.env.BOUNCE_PERSIST: I have to say I quite like the usability of "replace node by bounce" |
|
Regarding the symlink option, I was thinking of helping you create some npm / better build scripts anyway so the symlink could be setup as part of that... |
|
soz - i don't quite follow your idea -- would you mind explaining it again -- thanks |
Option 1:
Option 2:Use environment variable to switch between the behaviors. If |
|
how about my first suggestion where the bounce options are placed after a bounce -nodeOpt lib/server.js -- -g -r -w src It seems fairly simple? |
|
Personally, I'd prefer any other option. I like being able to switch between |
|
I think if we have my export BOUNCE_PARAMS='-w -g -r' && bounce ...etc we'll cover all the bases. |
It's great that when developing, bounce will keep my latest version running so I can just reload the browser to see changes. But people make mistakes, and when syntax errors prevent the file to run, bounce dies together with the node child instance.
This means that when developing and when bugs occur, I need to keep re-running my bounce all the time and it's pretty much back to where I was without bounce.
I think better behavior would be to print the failure to console but stay running, waiting for the file to be changes/fixed.
Change attached.