Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: recommend quoting for portability #260

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A CLI tool to run multiple npm-scripts in parallel or sequential.

- **Simplify.** The official `npm run-script` command cannot run multiple scripts, so if we want to run multiple scripts, it's redundant a bit. Let's shorten it by glob-like patterns.<br>
Before: `npm run clean && npm run build:css && npm run build:js && npm run build:html`<br>
After: `npm-run-all clean build:*`
After: `npm-run-all clean 'build:*'`
- **Cross platform.** We sometimes use `&` to run multiple command in parallel, but `cmd.exe` (`npm run-script` uses it by default) does not support the `&`. Half of Node.js users are using it on Windows, so the use of `&` might block contributions. `npm-run-all --parallel` works well on Windows as well.

## 💿 Installation
Expand Down
4 changes: 2 additions & 2 deletions bin/npm-run-all/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ Options:
--silent - - - - - - - - Set 'silent' to the log level of npm.

Examples:
$ npm-run-all --serial clean lint build:**
$ npm-run-all --parallel watch:**
$ npm-run-all --serial clean lint 'build:**'
$ npm-run-all --parallel 'watch:**'
$ npm-run-all clean lint --parallel "build:** -- --watch"
$ npm-run-all -l -p start-server start-browser start-electron

Expand Down
2 changes: 1 addition & 1 deletion bin/run-p/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Options:
For example, '-clns' equals to '-c -l -n -s'.

Examples:
$ run-p watch:**
$ run-p 'watch:**'
$ run-p --print-label "build:** -- --watch"
$ run-p -sl "build:** -- --watch"
$ run-p start-server start-browser start-electron
Expand Down
8 changes: 4 additions & 4 deletions bin/run-s/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ Options:
For example, '-clns' equals to '-c -l -n -s'.

Examples:
$ run-s build:**
$ run-s lint clean build:**
$ run-s --silent --print-name lint clean build:**
$ run-s -sn lint clean build:**
$ run-s 'build:**'
$ run-s lint clean 'build:**'
$ run-s --silent --print-name lint clean 'build:**'
$ run-s -sn lint clean 'build:**'

See Also:
https://github.com/mysticatea/npm-run-all#readme
Expand Down
8 changes: 4 additions & 4 deletions docs/npm-run-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ Options:
--silent - - - - - - - - Set 'silent' to the log level of npm.

Examples:
$ npm-run-all --serial clean lint build:**
$ npm-run-all --parallel watch:**
$ npm-run-all --serial clean lint 'build:**'
$ npm-run-all --parallel 'watch:**'
$ npm-run-all clean lint --parallel "build:** -- --watch"
$ npm-run-all -l -p start-server start-browser start-electron
```
Expand Down Expand Up @@ -121,14 +121,14 @@ We can use [glob]-like patterns to specify npm-scripts.
The difference is one -- the separator is `:` instead of `/`.

```
$ npm-run-all --parallel watch:*
$ npm-run-all --parallel 'watch:*'
```

In this case, runs sub scripts of `watch`. For example: `watch:html`, `watch:js`.
But, doesn't run sub-sub scripts. For example: `watch:js:index`.

```
$ npm-run-all --parallel watch:**
$ npm-run-all --parallel 'watch:**'
```

If we use a globstar `**`, runs both sub scripts and sub-sub scripts.
Expand Down
6 changes: 3 additions & 3 deletions docs/run-p.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Options:
For example, '-clns' equals to '-c -l -n -s'.

Examples:
$ run-p watch:**
$ run-p 'watch:**'
$ run-p --print-label "build:** -- --watch"
$ run-p -l "build:** -- --watch"
$ run-p start-server start-browser start-electron
Expand Down Expand Up @@ -85,14 +85,14 @@ We can use [glob]-like patterns to specify npm-scripts.
The difference is one -- the separator is `:` instead of `/`.

```
$ run-p watch:*
$ run-p 'watch:*'
```

In this case, runs sub scripts of `watch`. For example: `watch:html`, `watch:js`.
But, doesn't run sub-sub scripts. For example: `watch:js:index`.

```
$ run-p watch:**
$ run-p 'watch:**'
```

If we use a globstar `**`, runs both sub scripts and sub-sub scripts.
Expand Down
12 changes: 6 additions & 6 deletions docs/run-s.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ Options:
For example, '-clns' equals to '-c -l -n -s'.

Examples:
$ run-s build:**
$ run-s lint clean build:**
$ run-s --silent --print-name lint clean build:**
$ run-s -sn lint clean build:**
$ run-s 'build:**'
$ run-s lint clean 'build:**'
$ run-s --silent --print-name lint clean 'build:**'
$ run-s -sn lint clean 'build:**'
```

### npm-scripts
Expand Down Expand Up @@ -76,14 +76,14 @@ We can use [glob]-like patterns to specify npm-scripts.
The difference is one -- the separator is `:` instead of `/`.

```
$ run-s build:*
$ run-s 'build:*'
```

In this case, runs sub scripts of `build`. For example: `build:html`, `build:js`.
But, doesn't run sub-sub scripts. For example: `build:js:index`.

```
$ run-s build:**
$ run-s 'build:**'
```

If we use a globstar `**`, runs both sub scripts and sub-sub scripts.
Expand Down