Skip to content
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

Automatically restart mimosa when its config file changes #418

Closed
mindjuice opened this issue Dec 11, 2014 · 4 comments
Closed

Automatically restart mimosa when its config file changes #418

mindjuice opened this issue Dec 11, 2014 · 4 comments

Comments

@mindjuice
Copy link

During development, I frequently add new entries to my browserify:aliases list in mimosa-config.coffee. Currently, every time I do so, I have to remember to Alt-Tab over to Mimosa's window, do a Ctrl-C and then up arrow, then Enter to kill and restart mimosa.

It sounds like not much effort, but when I am creating several files and new aliases in a row, it's a bit annoying and I sometimes forget and wonder why things are not working.

It would be great if mimosa could watch its own config file and then restart itself with the same arguments as it was initially run with. This could be an option in the config or the default.

@Anachron
Copy link
Contributor

Mimosa should automatically do that :-)
You sure you didnt disable it? What OS are you using?

@dbashford
Copy link
Owner

That's not in mimosa.

There is a module: https://github.com/dbashford/mimosa-restart that could probably be augmented to watch the config. Right now it just monitors your public directory and if it disappears it restarts mimosa in-process.

@dbashford
Copy link
Owner

I've included that functionality in mimosa-restart.

So, add "restart" to your modules and the below to your config and you'll restart when the mimosa-config.js updates.

restart: {
  updated:["mimosa-config.js"]
}

@mindjuice
Copy link
Author

That's awesome, thanks! I had just been looking through the code yesterday and was going to try and find some time to tackle it myself!

Much appreciated!

Ken
Sent from my iPhone

On Dec 15, 2014, at 12:00 PM, David Bashford [email protected] wrote:

I've included that functionality in mimosa-restart.

So, add "restart" to your modules and the below to your config and you'll restart when the mimosa-config.js updates.

restart: {
updated:["mimosa-config.js"]
}

Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants