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

change --global to --location=global #1213

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lang/en/docs/_installations/npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
2 changes: 1 addition & 1 deletion lang/en/docs/cli/global.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion lang/en/docs/cli/self-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions lang/en/docs/migrating-from-npm.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]` |
Expand Down