Comparing version 0.8.0 to 0.9.0
{ | ||
"name": "npm-watch", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"description": "run scripts from package.json when files change", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -125,2 +125,5 @@ # npm-watch | ||
Once you have the watcher running, you can force restart all tasks by entering `rs`. | ||
If you want to only force a single task, type the name of the key from the watch config (for example `rs test`). | ||
### Options | ||
@@ -127,0 +130,0 @@ |
@@ -33,3 +33,3 @@ 'use strict'; | ||
line = line.toString() | ||
var match = line.match(/^rs\s+(\w+)/) | ||
var match = line.match(/^rs\s*(.*)/) | ||
if (!match) { | ||
@@ -39,9 +39,17 @@ console.log('Unrecognized input:', line) | ||
} | ||
var proc = processes[match[1]] | ||
if (!proc) { | ||
console.log('Couldn\'t find process:', match[1]) | ||
return callback() | ||
if (match[1]) { | ||
var proc = processes[match[1]] | ||
if (!proc) { | ||
console.log('Couldn\'t find process:', match[1]) | ||
return callback() | ||
} | ||
proc.stdin.write('rs\r\n') | ||
return callback(); | ||
} else { | ||
Object.keys(processes).forEach(function (key) { | ||
processes[key].stdin.write('rs\r\n') | ||
}) | ||
callback() | ||
} | ||
proc.stdin.write('rs\n') | ||
callback() | ||
}) | ||
@@ -48,0 +56,0 @@ |
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
13259
166
233