From dfc637ab53ebb9f77f6dc0942629ddb47f9ccd3e Mon Sep 17 00:00:00 2001 From: Amir <72388304+amir-reza-tavakkoli@users.noreply.github.com> Date: Thu, 21 Sep 2023 20:11:10 +0330 Subject: [PATCH] change --global to --location=global --- lang/en/docs/_installations/npm.md | 2 +- lang/en/docs/cli/global.md | 2 +- lang/en/docs/cli/self-update.md | 2 +- lang/en/docs/migrating-from-npm.md | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lang/en/docs/_installations/npm.md b/lang/en/docs/_installations/npm.md index 6b97bdb6a..041dacccc 100644 --- a/lang/en/docs/_installations/npm.md +++ b/lang/en/docs/_installations/npm.md @@ -5,5 +5,5 @@ It is recommended to install Yarn through the [npm package manager](http://npmjs Once you have npm installed you can run the following both to **install** and **upgrade** Yarn: ```sh -npm install --global yarn +npm install --location=global yarn ``` diff --git a/lang/en/docs/cli/global.md b/lang/en/docs/cli/global.md index ccdae7fa5..8e39c6de7 100644 --- a/lang/en/docs/cli/global.md +++ b/lang/en/docs/cli/global.md @@ -12,7 +12,7 @@ layout: guide `yarn global` is a prefix used for a number of commands like `add`, `bin`, `list` and `remove`. They behave identically to their normal versions except that they use a global directory to store packages. The `global` command makes executables available to use on your operating system. -_Note: Unlike the `--global` flag in npm, `global` is a command which must immediately follow `yarn`. Entering `yarn add global package-name` will add the packages named `global` and `package-name` locally instead of adding `package-name` globally._ +_Note: Unlike the `--location=global` flag in npm, `global` is a command which must immediately follow `yarn`. Entering `yarn add global package-name` will add the packages named `global` and `package-name` locally instead of adding `package-name` globally._ This is useful for developer tooling that is not part of any individual project but instead is used for local commands. One such example is [nodemon](https://nodemon.io/) which can be installed globally like this: diff --git a/lang/en/docs/cli/self-update.md b/lang/en/docs/cli/self-update.md index b73ce0951..6d1237fe5 100644 --- a/lang/en/docs/cli/self-update.md +++ b/lang/en/docs/cli/self-update.md @@ -12,6 +12,6 @@ _**Important**: `self-update` is not available. See [policies](https://yarnpkg.c In order to update your version of Yarn, you can run one of the following commands: -- `npm install --global yarn` - if you've installed Yarn via npm (recommended) +- `npm install --location=global yarn` - if you've installed Yarn via npm (recommended) - `curl --compressed -o- -L https://yarnpkg.com/install.sh | bash` if you're on Unix - otherwise, check the docs of the installer you've used to install Yarn diff --git a/lang/en/docs/migrating-from-npm.md b/lang/en/docs/migrating-from-npm.md index 0fcbc4e1c..0d6e26378 100644 --- a/lang/en/docs/migrating-from-npm.md +++ b/lang/en/docs/migrating-from-npm.md @@ -53,8 +53,8 @@ your existing `npm-shrinkwrap.json` file and check in the newly created `yarn.lo | `npm install [package] --save-optional` | `yarn add [package] --optional` | | `npm install [package] --save-exact` | `yarn add [package] --exact` | | **_(N/A)_** | `yarn add [package] --tilde` | -| `npm install [package] --global` | `yarn global add [package]` | -| `npm update --global`                   | `yarn global upgrade`                     | +| `npm install [package] --location=global`| `yarn global add [package]` | +| `npm update --location=global`          | `yarn global upgrade`                     | | `npm rebuild` | `yarn add --force` | | `npm uninstall [package]` | `yarn remove [package]` | | `npm cache clean` | `yarn cache clean [package]` |