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

Add optional --watch-dir command line argument #155

Merged
merged 3 commits into from
Jun 11, 2018

Conversation

Jezzamonn
Copy link
Contributor

@Jezzamonn Jezzamonn commented May 28, 2018

Adds an extra argument for what directories to watch for changes. (Defaulting to the same directory that files are served from).

I mentioned in the commit message, an example use case (in fact, my use case) is only watching the build directory instead of all the unbuilt source files. Seeing as when the unbuilt files change, the code still needs to be recompiled before any changes take affect. In that situation reloading before then isn't helpful, it's only when the build files change that I want to reload stuff.

Also should resolve #153 (if the comment there doesn't work)

This lets a user only watch for changes in certain directory. Example use case is only watching the build directory in a project with a larger project that needs to be compiled, as changes to the source files don't immediately impact the page.
@alallier
Copy link
Owner

Great work thank you!

@alallier alallier merged commit e08180d into alallier:master Jun 11, 2018
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

Successfully merging this pull request may close these issues.

Watch files in a directory, and serve from its subdirectory
2 participants