Giter Club home page Giter Club logo

npm-home's Introduction

npm-home

Open the npm page, Yarn page, or GitHub repo of a package

Install

npm install --global npm-home

Usage

$ npm-home --help

  Usage
    $ npm-home [name] […]
    $ nh [name] […]

  Options
    --github -g  Open the GitHub repo of the package
    --yarn   -y  Open the Yarn homepage of the package

  Examples
    $ npm-home
    $ npm-home chalk -g
    $ npm-home execa ava -y

Related

  • gh-home - Open the GitHub page of the given or current directory repo

npm-home's People

Contributors

gregberge avatar hafffe avatar karlbateman avatar richienb avatar sindresorhus avatar tommy-mitchell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

npm-home's Issues

`nh -g babel-preset-minify` crashes

❯ npm install npm-home
+ [email protected]
added 78 packages in 2.241s

❯ ./node_modules/.bin/nh -g babel-preset-minify
Error: Expected a `target`
    at module.exports (/home/lydell/bugs/node_modules/opn/index.js:8:25)
    at packageJson.then.pkg (/home/lydell/bugs/node_modules/npm-home/cli.js:45:12)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Thanks for this very useful tool, btw!

Make the connection error message nicer :)

If you try to run npm-home while offline, this happens:

❯ nh --version
1.5.0

❯ nh -g npm-home
RequestError
    at ClientRequest.req.once.err (/home/lydell/.npm-global/lib/node_modules/npm-home/node_modules/got/index.js:73:21)
    at Object.onceWrapper (events.js:316:30)
    at emitOne (events.js:115:13)
    at ClientRequest.emit (events.js:210:7)
    at TLSSocket.socketErrorListener (_http_client.js:401:9)
    at emitOne (events.js:115:13)
    at TLSSocket.emit (events.js:210:7)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

I run into this every once in a while on the train where the Internet connection is spotty.

Accept multiple inputs

Currently, npm-home only supports opening one URL at a time:

npm-home/cli.js

Lines 85 to 86 in 9e1c49f

if (cli.input.length > 0) {
await openPackage(cli.input[0]);

It'd be nice if it could open multiple in one call:

> npm-home -g chalk meow ava

npm-home will trigger Xcode

$ nh joi -g will open Xcode and does not open browser
$ nh next -g will open browser

Do you have any idea about this situation?

My Mac is MacBook Air 10.13 (17A365)
$ nh --version // 1.6.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.