stefanpenner/ember-cli — pull request #970 by jlauemoeller (2014-06-10 19:48:29+00:00)
Title: Provide a --watcher option to allow the user to specify watcher to use

The events-based Sane watcher only works under the assumption that source changes are made on the same file system as that monitored by the watcher. While this is normally the case, the assumption fails when the watcher runs on a mapped version of the development file system, e.g. inside a [Vagrant box](http://www.vagrantup.com/).

In this setup, `ember serve` runs inside the virtual machine and sees a mapped version of the actual development folder on the host machine (e.g. the developer's mac). When the developer changes source files on the host file system, these changes are immediately visible inside the VM, but since the VM only sees a mapping of the files, it doesn't receive any related file system events. For this reason, the Sane watcher doesn't detect any changes.

This PR simply adds a `--watcher` option that allows the user to specify that the ordinary polling Broccoli watcher should be used instead of the default Sane-based one. With this change in place, `ember-cli` once again works in Vagrant-like setups.

`--watcher events` chooses the Sane based watcher. This is the default when the option is not specified
`--watcher polling` chooses the ordinary Broccoli polling watcher.