jedcn/reveal-ck — pull request #19 by jedcn (2014-10-12 02:17:20+00:00)
Title: Enable "live reload" when running reveal-ck serve

## Overview

This implements the enhancement described here: https://github.com/jedcn/reveal-ck/issues/15.

Run `reveal-ck serve`, view your slides in a browser, change them with your favorite editor.

They'll automatically:

1. Rebuild
2. And reload

## Details

Prior to this change, running `reveal-ck serve` started up a webserver and sent all of the access logs into your terminal. Now, it still does the webserver but it also starts tracking changes on your file system and can rebuild and reload.

Here's an example of what you'll see in your terminal:

```
bundle exec reveal-ck serve
------------------------------------------------------------
[ reveal-ck ] Serving up slide content in 'slides/'.
[ reveal-ck ] Open your browser to 'http://localhost:10000'.
[ reveal-ck ] Press CTRL-C to stop.
------------------------------------------------------------
[ reveal-ck ] Getting Ready to Reload Browsers.
[ reload ] Using Guardfile at /Users/jnorthridge/c/personal/reveal-ck/files/reveal-ck/Guardfile.
[ reload ] LiveReload is waiting for a browser to connect.
[ reload ] Guard is now watching at '/private/tmp/reveal-ck-test'
[ reveal-ck ] Getting Ready to Rebuild Slides.
[ reveal-ck ] Starting Webserver.
```

And then let's say you opened a browser to https://localhost:10000:

```
[ reload ] Browser connected.
```

And then let's say you changed your slides file (`slides.md`) around with your favorite editor and saved it out:

```
[ rebuild ] Modified: /private/tmp/reveal-ck-test/slides.md
[ rebuild ] Generating slides for 'slides.mdl'..
[ reload ] Reloading browser: slides/index.html
```

And your browser would automatically be updated.

With prior versions, you would have had to run `reveal-ck generate` in the terminal and then press reload in your browser.