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

Add documentation for ls and ls --depth command #251

Merged
merged 1 commit into from
Nov 8, 2016
Merged
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
14 changes: 14 additions & 0 deletions en/docs/cli/ls.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,24 @@ layout: guide
yarn ls
```

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
package manager meta data files, which includes a project's dependencies.

```
yarn ls vx.x.x
├─ [email protected]
├─ [email protected]
│ └─ package-3@^2.1.0
└─ [email protected]
```

##### `yarn ls [--depth]` <a class="toc" id="toc-yarn-ls-depth" href="#toc-yarn-ls-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.

```
yarn ls --depth=0
```
Keep in mind, levels are zero-indexd.