11 ms·
Sigh, these sorts of things always force you to change how you develop and don't really work for mobile web dev. This wheel seems to been re-invented far too o
by newhouseb 15y ago
Sigh, these sorts of things always force you to change how you develop and don't really work for mobile web dev. This wheel seems to been re-invented far too often.
Alternatively:
sudo pip install watchdog
watchmedo shell-command -w -c "make" -i '*/.*' -R
Where "make" is either for a makefile or some other build script.
And then just put live.js (from http://livejs.com/ http://livejs.com/) as a script inside your pages.
This works anywhere with basically any stack (i.e. if you had some strange alien CSS preprocessor as long as it can be processed with a command you can use this), integrates into your normal build system and requires no browser plugins or proprietary binaries.
- ELV1S 15y agoLiveReload should works on every browser that supports WebSockets. It should work on modern WebKit-based mobile browsers. Live.js uses polling. It sends XHR HEAD request every second. LiveReload monitors file changes using FSEvents (on Mac OS X) and inotify (on Linux). When the file modified, it pushes its path to the browser and reloads immediately.
- benatkin 15y ago> Live.js uses polling. It sends XHR HEAD request every second. The horror!
- hnwh 15y agoIt is horror when you forget about it, and push it up to production
- benatkin 15y agoHas nothing to do with Live.js then. Isn't really even about a developer's forgetfulness when pushing to production. It would be about failure to set up different production and development environments, which can cause problems much worse than a wasteful AJAX call.
- andreyvit 15y agoUnfortunately it also spins up your fans and eats up your battery. (Also I've built the GUI tool when I got tired of firing up stuff in Terminal each time I start working on a project.)
- newhouseb 15y agoThis depends on what platform you're on - if you're on Linux, it will use inotify which is event based from the kernel (and therefore pretty efficient) and I think they recently added the OSX equivalent.