Flash an OS notification when a process writes to
npm install stderr --save
npm install stderr -g
Usagestderr exports one, single function. Require it and pass in a command, an array of arguments, and (optional) options.
var stderr = require('stderr') stderr('ls', ['-la'])
This is the same API (and options) as
child_process.spawn. All options other than
stdiowill be passed through.
CLIThe cli is made to be as simple as possible. Simply prefix your command with
stderr ls -la
Aboutstderr will display a notification when a process:
- Writes to stderr
- Throws an error
All standard streams are left untouched by stderr. Standard input, output, and error streams should be exactly as they are with the non-prefixed version of the command. That means all piping, redirection, and bash craziness you'd like to get get into should just work.
If you are on a system without notifications (like a server environment) they will simply fail silently, and your program will continue to read and write as usual, there just won't be any notifications.
stderr uses the excellent node-notifier module so be sure to read up on what platforms are supported.
With stderr, Tom just prepends the word
watchifycommand and now his computer magically notifies him that he stupidly missed a closing bracket. This saves him time and needless refreshing.
CONTRIBUTING.mdfor contribution guidelines.