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

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

merged 1 commit into from
Nov 8, 2016

Conversation

olingern
Copy link
Contributor

@olingern olingern commented Nov 8, 2016

Documentation for added functionality at #1463

@dhruvdutt
Copy link
Contributor

Please have a look at #181

@olingern
Copy link
Contributor Author

olingern commented Nov 8, 2016

@dhruvdutt My comment in #1123 may help.

@dhruvdutt
Copy link
Contributor

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>
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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

Copy link
Contributor Author

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!

@jamiebuilds jamiebuilds merged commit 5a12acc into yarnpkg:master Nov 8, 2016
Copy link
Contributor

@markstos markstos left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants