Closed dmmalam closed 6 years ago
Can you mock up a simplified example of what you mean (to attempt to replicate)? On 24 Jan 2014 23:13, "Dharmesh Malam" notifications@github.com wrote:
Is this currently possible:
I use nodemon for web dev, and it restarts correctly when my nodejs app changes. I however use middleware for css (less) and js(browserify) that can each watch their respective files and can rebundle them as necessary. I therefore put the client js / css in my nodemon ignore list. However if I make a error on the css/js file which crashes the process, I then have to manually restart nodemon as it won't detect the file change.
Ideally you should be allowed to optionally specify different files to watch/ignore when a process has crashed. Or is there a simple hack around this that I'm missing?
— Reply to this email directly or view it on GitHubhttps://github.com/remy/nodemon/issues/278 .
So for example:
server.js client.js
In server.js
you have say watchify to efficiently recomple client.js
on file changes.
I would start nodemon with
nodemon --ignore client.js server.js
And this works perfectly 90% of the time, any change in server.js
will be detected by nodemon
, and any change in client.js
will be taken care of by watchify. However if I make an syntax error in client.js
, it will crash watchify, which will then crash server.js
. I will then go and fix the error in client.js, and save but nothing will pick this up and I would have to restart the process.
Two workarounds are:
Ideally I could give a crash ignore/watch option. ie
nodemon --ignore client.js --crash-watch *.js server.js
so watch for changes in server.js, but then it crashes, also monitor for changes in client.js.
Hope this makes sense, it's a rather niche requirement.
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. Thank you for contributing <3
Is this currently possible:
I use nodemon for web dev, and it restarts correctly when my nodejs app changes. I however use middleware for css (less) and js(browserify) that can each watch their respective files and can rebundle them as necessary. I therefore put the client js / css in my nodemon ignore list. However if I make a error on the css/js file which crashes the process, I then have to manually restart nodemon as it won't detect the file change.
Ideally you should be allowed to optionally specify different files to watch/ignore when a process has crashed. Or is there a simple hack around this that I'm missing?