wplib-box icon indicating copy to clipboard operation
wplib-box copied to clipboard

Add API to allow Host to Tell Guest that a Watched File has Changed

Open mikeschinkel opened this issue 9 years ago • 0 comments

Linux's inotifywait does not recognize changes on a mounted drive, so any changes to your source code in your host machine's www folder that are mounted inside of the box as /var/www do not trigger a change notice. To get around this we used a combination of screen and watch to monitor for any change and then we use rsync to mirror the files to /var/mirrror/www where the changed files will trigger inotifywait.

But this is not optimal. Once we have Mac and Win installers for WPLib Box we can add to those installers the ability to set up file watchers that could notify the box which source file changes instead of the box needing to rely on the aforementioned hack.

A Vagrant plugin to do similar: https://github.com/adrienkohlbecker/vagrant-fsnotify

This is needed to run npm run watch on the host (vs. in the box); ref @naomicbush

mikeschinkel avatar Aug 12 '16 21:08 mikeschinkel