Is there any way to make reloader run when files other than modules change?
For instance, I have a less plugin that compiles into css when the server starts. However, to recompile .less file after a small change, I need to restart web server.
So, is there a way to add folders that reloader watches other than module files?
Is there any reason you must tie compilation of assets to server start?
As far as I can see, FileCheckerThread class is used for checking. You could monkey-patch the class to get desired behavior.
Maybe it could be possible to modify bottle so that:
- you can pass an alternative class as
reloaderargument -
FileCheckerThreadis organized in a way that the file list calculation is done in a separate method, allowing subclasses to overload it
One scenario where this could be useful is, for instance, reloading when .ini configuration file changes.
Well, it is not a must to tie compilation of assets to server start but I think it is easier to provide application start hook function that compiles less into css.
However, a static file watcher would be a must. For instance, an application object that reads config file from a json or yml file would require hot reload after change.
I'll take a look at FileCheckerThread. Thanks for your answer.
Same here, would be very useful when developing with rapydscript.