sintaxi/harp — pull request #360 by kevinsimper (2014-10-11 23:27:16+00:00)
Title: Implementing browser-sync

First draft for implementing browser-sync into harp.

I choose to implement it in the `bin/harp` because I do not think if you are using harp as a express middleware that you perhaps want browser-sync necessary.

Browser-sync does not have a documented way to let yourself inject the javascript that is uses, but that would also make it more complicated (prefer simple).

I made it so that browsersync as standard is one port above harp because that would make it easy to switch between basic and browser-sync.

Read about browser-sync here www.browsersync.io

But it is fairly simple, it sets up a proxy to your original server where it injects a socket.io javascript and then you set up a file glob on which files it should watch.

How to test:

```
bin/harp server test/apps/basic/public/ -w
```

![harp](https://cloud.githubusercontent.com/assets/1126497/4604443/09565598-519e-11e4-93af-e0f88169c6c6.gif)