Skip to content

Include --ignore-optional doc #271

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

Open
wants to merge 2 commits 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion en/docs/cli/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Using `--peer` or `-P` will install one or more packages in your
##### `yarn add <package...> [--optional,-O]` <a class="toc" id="toc-yarn-add-optional-o" href="#toc-yarn-add-optional-o"></a>

Using `--optional` or `-O` will install one or more packages in your
[`optionalDependencies`]({{url_base}}/docs/dependency-types#toc-optional-dependencies).
[`optionalDependencies`]({{url_base}}/docs/dependency-types#toc-optionaldependencies).

##### `yarn add <package...> [--exact/-E]` <a class="toc" id="toc-yarn-add-exact-e" href="#toc-yarn-add-exact-e"></a>

Expand Down
4 changes: 4 additions & 0 deletions en/docs/cli/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ to investigate network performance, and can be analyzed with tools such as

Don't read or generate a `yarn.lock` lockfile.

##### `yarn install --ignore-optional` <a class="toc" id="toc-yarn-install-ignore-optional" href="#toc-yarn-install-ignore-optional"></a>
Using `--ignore-optional` will skip dependencies labeled as optional in your package.json file. See
[`optionalDependencies`]({{url_base}}/docs/dependency-types#toc-optionaldependencies).

##### `yarn install --production` <a class="toc" id="toc-yarn-install-production" href="#toc-yarn-install-production"></a>

Using the `--production` flag, or when the `NODE_ENV` environment variable is
Expand Down