-
-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also removes the --help section from readme. It's too much.
- Loading branch information
1 parent
009981f
commit 3c42827
Showing
12 changed files
with
438 additions
and
237 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Concurrently Documentation | ||
|
||
## CLI | ||
|
||
These articles cover using concurrently through CLI: | ||
|
||
- [Prefixing](./cli/prefixing.md) | ||
- [Output Control](./cli/output-control.md) | ||
- [Shortcuts](./cli/shortcuts.md) | ||
- [Restarting Commands](./cli/restarting.md) | ||
- [Input Handling](./cli/input-handling.md) | ||
- [Passthrough Arguments](./cli/passthrough-arguments.md) | ||
- [Configuration](./cli/configuration.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Configuration | ||
|
||
You might want to configure concurrently to always have certain flags on. | ||
Any of concurrently's flags can be set via environment variables that are prefixed with `CONCURRENTLY_`. | ||
|
||
```bash | ||
$ export CONCURRENTLY_KILL_OTHERS=true | ||
$ export CONCURRENTLY_HANDLE_INPUT=true | ||
# Equivalent to passing --kill-others and --handle-input | ||
$ concurrently nodemon "echo 'hey nodemon, you won't last long'" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Input Handling | ||
|
||
By default, concurrently doesn't send input to any commands it spawns.<br/> | ||
In the below example, typing `rs` to manually restart [nodemon](https://nodemon.io/) does nothing: | ||
|
||
```bash | ||
$ concurrently "nodemon" "npm run watch-js" | ||
rs | ||
``` | ||
|
||
To turn on input handling, it's necessary to set the `--handle-input`/`-i` flag.<br/> | ||
This will send `rs` to the first command: | ||
|
||
```bash | ||
$ concurrently --handle-input "nodemon" "npm run watch-js" | ||
rs | ||
``` | ||
|
||
To send input to a different command instead, it's possible to prefix the input with the command index, followed by a `:`.<br/> | ||
For example, the below sends `rs` to the second command: | ||
|
||
```bash | ||
$ concurrently --handle-input "npm run watch-js" "nodemon" | ||
1:rs | ||
``` | ||
|
||
If the command has a name, it's also possible to target it using that command's name: | ||
|
||
```bash | ||
$ concurrently --handle-input --names js,server "npm run watch-js" "nodemon" | ||
server:rs | ||
``` | ||
|
||
It's also possible to change the default command that receives input.<br/> | ||
To do this, set the `--default-input-target` flag to a command's index or name. | ||
|
||
```bash | ||
$ concurrently --handle-input --default-input-target 1 "npm run watch-js" "nodemon" | ||
rs | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Output Control | ||
|
||
concurrently offers a few ways to control a command's output. | ||
|
||
## Hiding | ||
|
||
A command's outputs (and all its events) can be hidden by using the `--hide` flag. | ||
|
||
```bash | ||
$ concurrently --hide 0 "echo Hello there" "echo 'General Kenobi!'" | ||
[1] General Kenobi! | ||
[1] echo 'General Kenobi!' exited with code 0 | ||
``` | ||
|
||
## Grouping | ||
|
||
It might be useful at times to make sure that the commands outputs are grouped together, while running them in parallel.<br/> | ||
This can be done with the `--group` flag. | ||
|
||
```bash | ||
$ concurrently --group "echo Hello there && sleep 2 && echo 'General Kenobi!'" "echo hi Star Wars fans" | ||
[0] Hello there | ||
[0] General Kenobi! | ||
[0] echo Hello there && sleep 2 && echo 'General Kenobi!' exited with code 0 | ||
[1] hi Star Wars fans | ||
[1] echo hi Star Wars fans exited with code 0 | ||
``` | ||
|
||
## No Colors | ||
|
||
When piping concurrently's outputs to another command or file, you might want to force it to not use colors, as these can break the other command's parsing, or reduce the legibility of the output in non-terminal environments. | ||
|
||
```bash | ||
$ concurrently -c red,blue --no-color "echo Hello there" "echo 'General Kenobi!'" | ||
``` |
Oops, something went wrong.