Yarn: Add a `yarn browse pkg` command

Created on 22 Jun 2017  路  6Comments  路  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?

feature

What is the current behavior?

To go to a package detail page, you鈥檇 have to manually enter open https://yarnpkg.com/en/package/whatever instead of being able to do yarn browse whatever

What is the expected behavior?

yarn browse whatever opens https://yarnpkg.com/en/package/whatever in your default browser.

needs-discussion triaged

Most helpful comment

For what it's worth, I think this would be a useful feature.

I registered a short domain for these - https://yarn.fyi/ will redirect (eg. https://yarn.fyi/react)

All 6 comments

This feature can be done by a standalone tool.
I think Yarn should focus on package management.

fish:

function yarn-browse
  open https://yarnpkg.com/en/package/$argv[1]
end

bash:

function yarn-browse { 
  open https://yarnpkg.com/en/package/$1
}

You can add these to you respective .profile

(for future reference)

For what it's worth, I think this would be a useful feature.

I registered a short domain for these - https://yarn.fyi/ will redirect (eg. https://yarn.fyi/react)

This package does the job: https://github.com/sindresorhus/npm-home

@neoziro - That will open the npm detail page, not the Yarn one.

Was this page helpful?
0 / 5 - 0 ratings