This is basically a 3kb drop-in replacement for the "&" bash syntax :-).
It launches multiple commands in background from a fancy definition file proman.json
and merges their standard output(s).
This README reflects: 0.4.0-beta1
- Simply launch multiple background servers, builders, watchers etc. with one command
- Visual separators between outputs
- Reliable Ctrl+C : it kills all the launched processes and their children
- cmd-line utility
proman
readsproman.json
from current directory - User-defined "error" strings in output trigger bell ring and a big "ERROR" bar
- all
stderr
output is marked with red dot
npm install -g proman
- Create
proman.json
in your project directory. Use syntax specified below. - Run
proman
proman
launches all processes specified inproman.json
proman name
launches process with a namename
or all processes in a groupname
proman name1 name2 ...
launches processes or groups name1 name2 ...proman name -c
only shows the command(s) ofname
process/groupproman name -i
shows table of information regardingname
process/group
{
"processes" : [
{ "name": "clj-tdd",
"group":"clj",
"cwd":"editor",
"cmd": "lein midje :autotest",
"errorPatterns" : ["failed"]
}, {
"name": "livereload",
"cwd" : "client",
"delay" : 5000,
"group" : "web",
"cmd": "grunt watch --gruntfile Gruntfile-LiveReload.js"
}, {
"name": "devserver",
"group": "web",
"cwd":"devserver",
"cmd": "node node_modules/gulp/bin/gulp.js"
}, {
"name": "staticserver",
"group": "web",
"cwd" : "staticserver",
"cmd": "nodemon -w . -e js -- staticserver.js -p 6400 -e development -s ../client/build"
}
],
"errorPatterns" : ["Error:"]
}
- .name (string) - required - this is how processes are referred to in proman
- .cmd (string) - required - the command to run
- .group (string) - optional - enables launching all processes in a group by one command
- .cwd (string) - optional - if present changes working directory of a to-be launched process to this value
- .delay (number - miliseconds) - optional - if present delays launching of the process by this time in ms
- .disabled (boolean) - optional - skipped if true
Beta - work in progress!
Both individual processes and the main definition object can contain a errorPatterns
key containing a list of strings. If any of this strings is found in the output a big ERROR bar is displayed and the system bell rings. This is (also) intended to help with TDD.
- Simple keyboard shortcuts to restart one or more of the processes
- Throttle (group) output lines by some time interval (300ms)
- Add "color" option to processes