npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lapanoid-concurrently

v1.0.3

Published

Run commands concurrently

Downloads

7

Readme

Concurrently

Build Status

Version: 1.0.0 (previous stable)

Run multiple commands concurrently. Like npm run watch-js & npm run watch-less but better.

It also works on Windows. You can tune your npm scripts to work across platforms.

Install

The tool is written in Node.js, but you can use it to run any commands.

npm install -g concurrently

Usage

Remember to surround separate commands with quotes, like this:

concurrent "command1 arg" "command2 arg"

Otherwise concurrent would try to run 4 separate commands: command1, arg, command2, arg.

Help:

  Usage: concurrent [options] <command ...>

  Options:

    -h, --help                    output usage information
    -V, --version                 output the version number
    -k, --kill-others             kill other processes if one exits or dies
    --no-color                    disable colors from logging
    -p, --prefix <prefix>         prefix used in logging for each process.
    Possible values: index, pid, command, none. Default: index

    -r, --raw                     output only raw output of processes, disables prettifying and colors
    -l, --prefix-length <length>  limit how many characters of the command is displayed in prefix.
    The option can be used to shorten long commands.
    Works only if prefix is set to "command". Default: 10


  Examples:

   - Kill other processes if one exits or dies

       $ concurrent --kill-others "grunt watch" "http-server"

   - Output nothing more than stdout+stderr of child processes

       $ concurrent --raw "npm run watch-less" "npm run watch-js"

   - Normal output but without colors e.g. when logging to file

       $ concurrent --no-color "grunt watch" "http-server" > log

  For more details, visit https://github.com/kimmobrunfeldt/concurrently

FAQ

  • Process exited with code null?

    From Node child_process documentation, exit event:

    This event is emitted after the child process ends. If the process terminated normally, code is the final exit code of the process, otherwise null. If the process terminated due to receipt of a signal, signal is the string name of the signal, otherwise null.

    So null means the process didn't terminate normally. This will make concurrent to return non-zero exit code too.

Why

I like task automation with npm but the usual way to run multiple commands concurrently is npm run watch-js & npm run watch-css. That's fine but it's hard to keep on track of different outputs. Also if one process fails, others still keep running and you won't even notice the difference.

Another option would be to just run all commands in separate terminals. I got tired of opening terminals and made concurrently.

NPM Issue

Previously I thought this could fix some problems I had with watching scripts and this readme said:

When running watch or serve tasks, I'd recommend to use --kill-others option:

concurrent --kill-others "npm run watch-js" "npm run watch-less"

That way, if for some reason e.g. your watch-less died, you would notice it easier.

However NPM didn't work as I hoped it would. See this issue.