burke / zeus

Boot any rails app in under a second.
MIT License
3.33k stars 231 forks source link

QUESTION: is it possible to customize which folders Zeus monitors for file changes? #649

Closed kigster closed 6 years ago

kigster commented 6 years ago

We have many files in non-standard locations, and I would like to understand if it's possible to customize which folders each command should be watching?

Thanks in advance!

myxoh commented 6 years ago

+1 to this question.

sideshowcoder commented 6 years ago

Yes you can customize this as part of your custom_plan.rb file. Basically zeus will track all files which are loaded by mokeypatching load see https://github.com/burke/zeus/blob/master/rubygem/lib/zeus/load_tracking.rb so depending on which files are loaded by which command the those files will be watched. https://github.com/burke/zeus/blob/master/rubygem/lib/zeus/rails.rb would be the default rails setup which you would want to override given your file setup. For the way it works take a look at Zeus::LoadTracking.add_feature(file) Hope this helps.