-
Notifications
You must be signed in to change notification settings - Fork 994
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
Update the documentation for the ls command for the rename to list. #277
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -125,7 +125,7 @@ docs_cli_licenses: yarn licenses | |
docs_cli_link: yarn link | ||
docs_cli_login: yarn login | ||
docs_cli_logout: yarn logout | ||
docs_cli_ls: yarn ls | ||
docs_cli_list: yarn list | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be moved above login / logout to retain alpha order. |
||
docs_cli_outdated: yarn outdated | ||
docs_cli_owner: yarn owner | ||
docs_cli_pack: yarn pack | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ layout: guide | |
|
||
##### `yarn global` <a class="toc" id="toc-yarn-global" href="#toc-yarn-global"></a> | ||
|
||
`yarn global` is a prefix used for a number of commands like `add`, `bin`, `ls` and `remove`. They behave identically to their normal versions except that they use a global directory to store packages. The `global` command makes binaries available to use on your operating system. | ||
`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 binaries available to use on your operating system. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
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 [create-react-app](https://github.com/facebookincubator/create-react-app) which can be installed globally like this: | ||
|
||
|
@@ -24,6 +24,6 @@ Read more about the commands that can be used together with `yarn global`: | |
|
||
- [`yarn add`]({{url_base}}/docs/cli/add): add a package to use in your current package. | ||
- [`yarn bin`]({{url_base}}/docs/cli/bin): displays the location of the yarn bin folder. | ||
- [`yarn ls`]({{url_base}}/docs/cli/ls): list installed packages. | ||
- [`yarn list`]({{url_base}}/docs/cli/list): list installed packages. | ||
- [`yarn remove`]({{url_base}}/docs/cli/remove): remove a package that will no longer be used in your current package. | ||
- [`yarn upgrade`]({{url_base}}/docs/cli/upgrade): upgrades packages to their latest version based on the specified range. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
--- | ||
id: docs_cli_ls | ||
id: docs_cli_list | ||
guide: docs_cli | ||
layout: guide | ||
--- | ||
|
||
<p class="lead">List installed packages.</p> | ||
|
||
##### `yarn ls` <a class="toc" id="toc-yarn-ls" href="#toc-yarn-ls"></a> | ||
##### `yarn list` <a class="toc" id="toc-yarn-list" href="#toc-yarn-list"></a> | ||
|
||
```sh | ||
yarn ls | ||
yarn list | ||
``` | ||
|
||
The `yarn ls` command mimics the expected Unix behavior of listing. In Yarn, the `ls` | ||
command lists all dependencies for the current working directory by referencing all | ||
The `yarn list` command mimics the expected Unix behavior of listing. In Yarn, the `list` | ||
command lists all dependencies for the current working directory by referencing all | ||
package manager meta data files, which includes a project's dependencies. | ||
|
||
``` | ||
yarn ls vx.x.x | ||
yarn list vx.x.x | ||
├─ package-1@1.3.3 | ||
├─ package-2@5.0.9 | ||
│ └─ package-3@^2.1.0 | ||
└─ package-3@2.7.0 | ||
``` | ||
|
||
##### `yarn ls [--depth]` <a class="toc" id="toc-yarn-ls-depth" href="#toc-yarn-ls-depth"></a> | ||
##### `yarn list [--depth]` <a class="toc" id="toc-yarn-list-depth" href="#toc-yarn-list-depth"></a> | ||
|
||
By default, all packages and their dependencies will be displayed. To restrict the depth of the | ||
dependencies, you can add a flag, `--depth`, along with the desired level to the `ls` command. | ||
dependencies, you can add a flag, `--depth`, along with the desired level to the `list` command. | ||
|
||
``` | ||
yarn ls --depth=0 | ||
yarn list --depth=0 | ||
``` | ||
Keep in mind, levels are zero-indexed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should reordered to be above login, logout in order to keep the commands in alpha order