Comparing version 3.1.2 to 3.2.0
@@ -48,4 +48,8 @@ var xtend = require('xtend') | ||
if (reject(path, ignoreReload)) | ||
if ((Array.isArray(ignoreReload) || typeof ignoreReload === 'string') | ||
&& reject(path, ignoreReload)) { | ||
return | ||
} else if (typeof ignoreReload === 'function' && ignoreReload(path)) { | ||
return | ||
} | ||
@@ -52,0 +56,0 @@ try { |
{ | ||
"name": "wtch", | ||
"version": "3.1.2", | ||
"version": "3.2.0", | ||
"description": "small livereload/watch command line utility", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -58,4 +58,17 @@ # wtch | ||
- `port` the port for livereload, defaults to 35729 | ||
- `ignoreReload` a glob or array of globs to ignore live reload events (`watch` event is still triggered) | ||
- `ignoreReload` allows ignoring LiveReload events for specific files; can be a file path, or an array of paths, or a function that returns `true` to ignore the reload, Example: | ||
```js | ||
wtch('**/*.js', { | ||
ignoreReload: function(file) { | ||
//don't trigger LiveReload for this file | ||
if (file === fileToIgnore) | ||
return true | ||
return false | ||
} | ||
}) | ||
//instead, manually decide what to do when that file changes | ||
.on('watch', handler) | ||
``` | ||
#### `live.on('connect')` | ||
@@ -62,0 +75,0 @@ |
115
142
9536
4