-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add possibility to watch files in subdirectories with optional "exclude" paths #25
Comments
It watches all files and sub-directories from where you run the reload command |
It would be really nice to be able to configure this behaviour. Perhaps just exposing supervisor's |
Yeah that should be easy enough to do and also be useful. Your thoughts on this @jprichardson? |
#48 should be a valid implementation. What do you guys think? |
I'm not a big fan of overcomplicating software. What's the use case @gersongoulart @Restuta? Why not just run |
@jprichardson I'm sorry this sounded like overcomplicating. The goal would be exactly to avoid running |
What if we just exposed supervisor's ignore option? Would that satisfy you both? |
@alallier you can decide to do whatever you like here. |
@jprichardson what do you mean? I am running it at the root and if I have CSS files in |
So I've gave this some thought and think I have a solution that will provide what @Restuta and @gersongoulart want but also keep it simple like @jprichardson wants. We should just abstract the supervisor arguments, provide an object or array argument (some optional argument) that can override our defaults but handle any supervisor flag. Then we can just point config options to supervisor's README and also the program would be dynamic to any change supervisor may make that either changes a flag or adds a new one, as reload would just take the argument of supervisor options. Also this would add one new flag to reload and remove one, resulting in a wash. Something like: reload -b --supervisor-configs ['-s', '-pid', '--debug', '-w js,html'] or reload -b -c ['-s', '-pid', 'debug', '-w js,html'] |
@Restuta it should?
@alallier something to think about if you do that, is that you tether |
yes, of course |
So after some discussions here I see three possible different paths reload could take (command line use only)
*Note these none of these changes would affect how reload is used in an express app, as it's up to user to configure their own file watcher and options in their express application. @jprichardson I would like you to make the decision on this though, as all of these options lead to different implemented/non-implemented outcomes |
@alallier 3 sounds great. Thanks for writing this out. |
Great 3 was also my choice! |
So do we have any status on number 3? It sounds like it could improve this module 10 fold, and could be extremely useful for me (for example, the --ignore options found in node supervisor). I mean, considering it's two years after the last comment on this issue, it'd be awesome if we could get this implemented. |
Currently "reload" command only watches files that are present in current directory which is very-limiting. It would be nice if by default it would watch all the files in all sub-directories.
The text was updated successfully, but these errors were encountered: