3.0.5 • Published 2 years ago
too v3.0.5
too
The opposite of tee command, combining stdout/stderr from multiple commands and kill them with one signal (Ctrl+C).
-> command 1 stream ─┐
-> command 2 stream ─┤
└─ stdout/stderr/SIGINT to kill bothIt means, you can write 2 parallel jobs in 1 npm script!!
// package.json
{
"scripts": {
"start": "too --cmd 'rails s' --cmd 'webpack'"
// Start server and client HMR in parallel,
// and you can kill both by one Ctrl+C!!
},
}Why?
Sometimes we do that,
% nohup rails server &
% nohup npm start-webpack &
# after you did some work
% pkill rails
% pkill webpackI don't wanna do this any more, just wanna run multiple processes and kill them with one Ctrl+C!
Usage
% too --cmd 'rails server' --cmd 'npm start-webpack'Then you will get
[0] rails # Rails log here
[1] npm # NPM log here
# And you can kill both by one `Ctrl+C` (SIGINT)Too files
Or you can define your tasks on a yaml file
# too.local.yaml
main:
jobs:
- run: rails server
- run: npm start-webpackthen
% too ./too.local.yamlInstall
% npm install tooIssues
3.0.4
2 years ago
3.0.3
2 years ago
3.0.2
2 years ago
3.0.1
2 years ago
3.0.5
2 years ago
3.0.0
2 years ago
2.3.0
2 years ago
2.3.2
2 years ago
2.4.0
2 years ago
2.3.1
2 years ago
2.2.0
3 years ago
2.1.0
5 years ago
2.0.4
6 years ago
2.0.3
7 years ago
2.0.2
7 years ago
2.0.1
7 years ago
2.0.0
7 years ago
1.0.1
7 years ago
0.0.0
12 years ago