Nothing Prevents Misery

    too

    2.1.0 • Public • Published

    too

    Node.js CI codecov Maintainability npm version

    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 both
    

    It 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!!
        },
    }

    This is JavaScript implementation of too.

    Why?

    Sometimes we do that,

    % nohup rails server &
    % nohup npm start-webpack &
    
    # after you did some work
    
    % pkill rails
    % pkill webpack

    I 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)

    Install

    % npm install too

    Issues

    Install

    npm i too

    DownloadsWeekly Downloads

    4

    Version

    2.1.0

    License

    MIT

    Unpacked Size

    27.3 kB

    Total Files

    25

    Last publish

    Collaborators

    • otiai10