Comparing version 3.1.1 to 3.1.2
{ | ||
"name": "wtch", | ||
"version": "3.1.1", | ||
"version": "3.1.2", | ||
"description": "small livereload/watch command line utility", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,3 +5,3 @@ # wtch | ||
A small command-line app that watches for file changes and triggers a live-reload on file save (to be used with the [LiveReload plugin](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en)). Watches the current working directory for `js,html,css` file changes. Ignores `.git`, `node_modules`, and `bower_components`, and other hidden files. | ||
A small command-line app that watches for file changes and triggers a live-reload on file save (using [LiveReload](http://livereload.com/)). Watches the current working directory for `js,html,css` file changes. Ignores `.git`, `node_modules`, and `bower_components`, and other hidden files. | ||
@@ -21,3 +21,3 @@ ```sh | ||
See [setup](#setup) for a basic how-to, and [tooling](#Tooling) for more advanced uses with browserify, watchify, etc. | ||
See [setup](#livereload-setup) for a basic how-to, and [tooling](#Tooling) for more advanced uses with browserify, watchify, etc. | ||
@@ -74,4 +74,18 @@ PRs/suggestions welcome. | ||
## Setup | ||
## LiveReload Setup | ||
There are two common ways of enabling LiveReload. | ||
#### Script Tag | ||
You can insert the following script tag in your HTML file. This will work across browsers and devices. | ||
```html | ||
<script>document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>')</script> | ||
``` | ||
Or you could use [inject-lr-script](https://github.com/mattdesl/inject-lr-script) to inject it while serving HTML content. | ||
#### Browser Plugin | ||
First, install the LiveReload plugin for your browser of choice (e.g. [Chrome](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en)). | ||
@@ -78,0 +92,0 @@ |
10083
129