-
Notifications
You must be signed in to change notification settings - Fork 996
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
Conversation
Please have a look at #181 |
@dhruvdutt My comment in #1123 may help. |
Thanks for the reference and your efforts documenting it. |
@@ -4,18 +4,32 @@ guide: docs_cli | |||
layout: guide | |||
--- | |||
|
|||
<p class="lead">List installed packages.</p> | |||
<p class="lead">List all dependencies installed for the current working directory</p> |
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.
I don't think you need to specify current working directory in the description of this command.
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.
I added it in case yarn decided to add support for a --global
flag in the future, differentiating the default behavior from a global listing. I could also see someone very new not understanding ls
is relative to the cwd and the directory's package.json / bower.json / yarn.json. I think without the 'cwd' clause, it assumes the user has some knowledge about ls
and basic unix commands.
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.
That does exist as yarn global ls
, I don't see Yarn adding yarn ls --global
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.
I see. Makes sense. Updated and rebased!
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.
Based on this documentation, I would expect that yarn list --depth 0
would display the top level dependencies. But they don't. The docs should be updated to clarify what yarn list --depth 0
is actually displaying. For example, here are the dependencies of lambda-expire-snapshots
:
"dependencies": {
"async": "^2.5.0",
"aws-sdk": "^2.6.10",
"grandfatherson": "^1.1.1",
"lodash": "^4.17.4"
},
But here is what yarn list --depth 0
produces for the package. If this is the "minimum depth", the docs should explain why there is more than the top level deps displayed here.
yarn list v1.2.1
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
Documentation for added functionality at #1463