+16
-1
| #!/bin/bash | ||
| export PATH=node_modules/.bin:$PATH | ||
| update_path () { | ||
| local prev="" | ||
| local rel="node_modules/.bin" | ||
| local result="" | ||
| while [ "$PWD" != "$prev" ]; do | ||
| prev="$PWD" | ||
| [ -d "node_modules/.bin" ] && result="$result$rel:" | ||
| rel="../$rel" | ||
| cd .. | ||
| done | ||
| export PATH="$result$PATH" | ||
| } | ||
| subprocs () { | ||
@@ -72,2 +85,4 @@ for pid in $(ps ax -o ppid,pid | awk "\$1 == $1 {print \$2}"); do | ||
| update_path | ||
| # always fork to get rid of weird "terminated" message | ||
@@ -74,0 +89,0 @@ # also this gives us docker support since we don't run as pid=1 |
+1
-1
| { | ||
| "name": "npm-start", | ||
| "version": "1.4.0", | ||
| "version": "1.4.1", | ||
| "description": "'npm start' written in bash that propagates kill to subprocesses", | ||
@@ -5,0 +5,0 @@ "repository": { |
5069
4.84%