Comparing version 3.2.1 to 4.0.0
16
index.js
@@ -10,3 +10,3 @@ var xtend = require('xtend') | ||
'node_modules/**', 'bower_components/**', | ||
'.git', '.hg', '.svn', '.DS_Store', | ||
'.git', '.hg', '.svn', '.DS_Store', | ||
'*.swp', 'thumbs.db', 'desktop.ini' | ||
@@ -17,2 +17,4 @@ ] | ||
opt = xtend({ | ||
port: 35729, | ||
host: 'localhost', | ||
event: 'change', | ||
@@ -25,3 +27,3 @@ ignored: ignore, | ||
opt.port = 35729 | ||
var ignoreReload = opt.ignoreReload | ||
@@ -35,4 +37,4 @@ var emitter = new Emitter() | ||
opt.usePolling = true | ||
server.listen(opt.port, 'localhost', function(a) { | ||
server.listen(opt.port, opt.host, function () { | ||
if (closed) | ||
@@ -43,4 +45,4 @@ return | ||
watcher = watch(glob, opt) | ||
watcher.on(opt.event, opt.event === 'all' | ||
? reload | ||
watcher.on(opt.event, opt.event === 'all' | ||
? reload | ||
: reload.bind(null, 'change')) | ||
@@ -97,2 +99,2 @@ | ||
}) | ||
} | ||
} |
{ | ||
"name": "wtch", | ||
"version": "3.2.1", | ||
"version": "4.0.0", | ||
"description": "small livereload/watch command line utility", | ||
@@ -17,3 +17,3 @@ "main": "index.js", | ||
"bole": "^2.0.0", | ||
"chokidar": "^1.0.0-rc3", | ||
"chokidar": "^1.2.0", | ||
"events": "^1.0.2", | ||
@@ -20,0 +20,0 @@ "minimatch": "^2.0.1", |
@@ -58,2 +58,3 @@ # wtch | ||
- `port` the port for livereload, defaults to 35729 | ||
- `livereload` (boolean) default true; can be used to disable livereload altogether and use this only as a thin chokidar wrapper | ||
- `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: | ||
@@ -60,0 +61,0 @@ |
10834
5
119
143
Updatedchokidar@^1.2.0