livereload
Advanced tools
Comparing version 0.6.2 to 0.6.3
@@ -1,13 +0,14 @@ | ||
var liveReload = require('./lib/livereload'); | ||
const LiveReload = require('../lib/livereload'); | ||
const ary = [ | ||
'md', | ||
'text' | ||
const extensionsToWatch = [ | ||
'md', | ||
'text' | ||
]; | ||
const liveReloadServer = liveReload.createServer({ | ||
port: 35729, | ||
const liveReloadServer = LiveReload.createServer({ | ||
port: 35729, | ||
debug: true, | ||
exts: ary | ||
}).watch(__dirname); | ||
exts: extensionsToWatch | ||
}); | ||
liveReloadServer.watch(__dirname); |
@@ -46,3 +46,3 @@ // Generated by CoffeeScript 1.12.4 | ||
long: "exts", | ||
description: "An array of extensions you want to observe. An example 'jade scss' (quotes are required). In addition to the defaults (html, css, js, png, gif, jpg, php, php5, py, rb, erb, and \"coffee.\").", | ||
description: "A comma-separated list of extensions you wish to watch in addition to the defaults (html, css, js, png, gif, jpg, php, php5, py, rb, erb, coffee).", | ||
required: false, | ||
@@ -68,3 +68,5 @@ value: true | ||
}) : []; | ||
exts = opts.get('exts') ? opts.get('exts').split(',') : []; | ||
exts = opts.get('exts') ? opts.get('exts').split(',').map(function(ext) { | ||
return ext.trim(); | ||
}) : []; | ||
usePolling = opts.get('usepolling') || false; | ||
@@ -71,0 +73,0 @@ wait = opts.get('wait') || 0; |
@@ -46,2 +46,5 @@ // Generated by CoffeeScript 1.12.4 | ||
} | ||
if (this.config.exts.length > 0) { | ||
console.log("\x1b[31m%s\x1b[0m", "*** DEPRECATION WARNING *** The exts option will REPLACE extensions in 0.6.4. ***"); | ||
} | ||
this.config.exts = this.config.exts.concat(defaultExts); | ||
@@ -193,3 +196,5 @@ this.config.exclusions = this.config.exclusions.concat(defaultExclusions); | ||
Server.prototype.close = function() { | ||
this.watcher.close(); | ||
if (this.watcher) { | ||
this.watcher.close(); | ||
} | ||
this.server._server.close(); | ||
@@ -196,0 +201,0 @@ return this.server.close(); |
{ | ||
"name": "livereload", | ||
"description": "LiveReload server", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"contributors": [ | ||
@@ -26,3 +26,3 @@ { | ||
"dependencies": { | ||
"chokidar": "^1.6.0", | ||
"chokidar": "^1.7.0", | ||
"opts": ">= 1.2.0", | ||
@@ -29,0 +29,0 @@ "ws": "^1.1.1" |
@@ -171,2 +171,8 @@ | ||
### 0.6.3 | ||
* Updated to use Chokidar 1.7, which hopefully fixes some memory issues. | ||
* BUGFIX: Check to see if a `watcher` object is actually defined before attempting to close. | ||
* Added deprecation warning for `exts` option. In the next version, extensions you specify on the command line will OVERRIDE the default extensions. We'll add a new option for adding your exts to the defaults. | ||
* Modified CLI so it trims spaces from the extensions in the array, just in case you put spaces between the commas. | ||
### 0.6.2 | ||
@@ -173,0 +179,0 @@ * CLI now properly splits extension list. Previous versions appended a blank entry to the list of extensions. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75292
1380
213
Updatedchokidar@^1.7.0