Skip to content

v7.23.0 #3733

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

Merged
merged 7 commits into from
Sep 9, 2021
Merged

v7.23.0 #3733

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: Add --if-present flag documentation to workspaces
PR-URL: #3715
Credit: @Matsuuu
Close: #3715
Reviewed-by: @wraithgar
  • Loading branch information
Matsuuu authored and wraithgar committed Sep 8, 2021
commit eda9162f2db19b512d3af6b0d43201d54045c13a
10 changes: 10 additions & 0 deletions docs/content/using-npm/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,16 @@ npm run test --workspaces

Will run the `test` script in both `./packages/a` and `./packages/b`.

### Ignoring missing scripts

It is not required for all of the workspaces to implement scripts run with the `npm run` command.

By running the command with the `--if-present` flag, npm will ignore workspaces missing target script.

```
npm run test --workspaces --if-present
```

### See also

* [npm install](/commands/npm-install)
Expand Down