Comparing version 0.1.6 to 0.1.7
{ | ||
"name": "npm-watch", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "run scripts from package.json when files change", | ||
@@ -17,3 +17,2 @@ "main": "index.js", | ||
"scripts": { | ||
"test": "tape test/*.js", | ||
"demo": "markdown-code-blocks -t bash < README.md", | ||
@@ -20,0 +19,0 @@ "exclusions": "bash -c echo 'An extension'", |
@@ -11,3 +11,3 @@ 'use strict'; | ||
module.exports = function watchPackage (pkgDir, exit) { | ||
module.exports = function watchPackage(pkgDir, exit) { | ||
var pkg = require(path.join(pkgDir, 'package.json')) | ||
@@ -82,3 +82,3 @@ var processes = {} | ||
cwd: pkgDir, | ||
stdio: inherit === true? ['pipe', 'inherit', 'pipe']: 'pipe' | ||
stdio: inherit === true ? ['pipe', 'inherit', 'pipe'] : 'pipe' | ||
}) | ||
@@ -97,7 +97,10 @@ if (inherit === true) return; | ||
function die (message, code) { | ||
stdin.stderr.write(message) | ||
stdin.end() | ||
stdin.stderr.end() | ||
stdin.stdout.end() | ||
function die(message, code) { | ||
process.stderr.write(message) | ||
if (stdin) { | ||
stdin.end() | ||
stdin.stderr.end() | ||
stdin.stdout.end() | ||
} | ||
exit(code || 1) | ||
@@ -107,3 +110,3 @@ } | ||
function prefixer (prefix) { | ||
function prefixer(prefix) { | ||
return through(function (line, _, callback) { | ||
@@ -110,0 +113,0 @@ line = line.toString() |
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
110
8921