concurrently
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
chalk | 4.1.2 | 11.31 kB | MIT | prod | |
date-fns | 2.30.0 | 682.42 kB | MIT | prod | |
lodash | 4.17.21 | 311.49 kB | MIT | prod | |
rxjs | 7.8.1 | 734.42 kB | Apache-2.0 | prod | |
shell-quote | 1.8.1 | 15.23 kB | MIT | prod | |
spawn-command | 0.0.2 | 2.17 kB | UNKNOWN | prod | 1 1 |
supports-color | 8.1.1 | 3.64 kB | MIT | prod | |
tree-kill | 1.2.2 | 3.17 kB | MIT | prod | |
yargs | 17.7.2 | 64.15 kB | MIT | prod |
Concurrently is a powerful utility package for JavaScript that allows users to run multiple commands simultaneously. The name "concurrently" succinctly encapsulates its core functionality. The package is compatible with different operating systems, including Windows. This tool makes parallel task execution straightforward; tasks run simultaneously, and their output is easy to follow thanks to applied prefixes. A significant feature is the --kill-others
switch, which terminates all commands if one of them fails, thus ensuring that your workflow does not continue with unsuccessful operations.
To utilize the Concurrently package, first, it must be installed. This JavaScript tool can be added globally or locally to your JavaScript project. For a global installation, use the command npm i -g concurrently
if you're using npm or yarn global add concurrently
if you're using Yarn. For a local installation, the commands are npm i -D concurrently
or yarn add -D concurrently
, respectively.
Once installed, you can begin running commands concurrently. Always enclose separate commands in quotes to ensure proper execution. For example, concurrently "command1 arg" "command2 arg"
. If using Concurrently in the scripts
section of your package.json, escape the quotes, such as "start": "concurrently \"command1 arg\" \"command2 arg\""
.
Here are a few more examples:
Running npm run commands concurrently:
concurrently "npm:watch-js" "npm:watch-css" "npm:watch-node"
And a scenario where commands support wildcards:
concurrently "npm:watch-*"
The built-in documentation for Concurrently can be found on its GitHub page (https://github.com/open-cli-tools/concurrently). This extensive resource includes information on installation, usage (with examples), command line options parameters, programmable API documentation, and more. Reviewing these guides should provide a comprehensive understanding of how to effectively use Concurrently.