Find a way with entr[0] and an http server to tell the browser to reload the currently viewed file if it changes.
Today, entr allows you to restart a command when a file changes.
A web server allows you to serve local files to your browser.
If you use npm, lots of libs allow you to serve your web ui, and make the browser reload the page when something has changed.
But this is tied to npm, and even to the framework you use (eg: angular has its own way).
It would be cool if we could have a way to do that for any tool/language. Like, could a tool tell the browser to reload, because that tool was restarted by entr due to a file change?
This would allow live preview on any kind of files, or maybe even program output in the browser without having to press F5 every time.
if you search for livereload + whatever framework/language you use, you will probably find an implementation that integrates nicely. but the cli works just fine for anything, really.
Today, entr allows you to restart a command when a file changes.
A web server allows you to serve local files to your browser.
If you use npm, lots of libs allow you to serve your web ui, and make the browser reload the page when something has changed.
But this is tied to npm, and even to the framework you use (eg: angular has its own way).
It would be cool if we could have a way to do that for any tool/language. Like, could a tool tell the browser to reload, because that tool was restarted by entr due to a file change?
This would allow live preview on any kind of files, or maybe even program output in the browser without having to press F5 every time.
[0]: https://github.com/clibs/entr