Code Monkey home page Code Monkey logo

Comments (4)

ealush avatar ealush commented on September 26, 2024

A few questions:

  1. Are --github and --homepage mutually exclusive the same way open and homepage are?
  2. I am assuming this should rely on the "repository" field. What about cases in which it is not github? Maybe use "repo" instead?
  3. What about non-http repository fields? Or maybe we should only rely on packageJson?.repository?.url for safety? - it will limit the amount of repos that will actually be able to make use of it, though. Alternatively, we can run a url validity check. Would it be cool if I install an external dependency for that?

from qnm.

ranyitz avatar ranyitz commented on September 26, 2024
  1. You are correct, currently --homepage does this functionality, and uses npm own words so I think that it's clear enough.

open will open the package.json of a chosen package in your editor, so it's different.

  1. We could use the repository field if it starts with https since GitHub knows to redirect.

  2. Good point, yeah sure, we can add another dependency (we're using ncc to bundle everything so it will run fast when using npx)


To say the truth I haven't used the --homepage flag myself, since for the most part, I just need to know the local versions, so I wouldn't invest a lot in supporting edge cases of this feature. Unless there are people who will ask for it.

from qnm.

ealush avatar ealush commented on September 26, 2024

Regarding 1. I meant that when using open, the function returns, so the homepage option is ignored. My question is when using homepage along with repo, should it also immediately return as well, or should it open both the homepage and the repo project in the browser?

from qnm.

ranyitz avatar ranyitz commented on September 26, 2024

I don't mind, feel free to choose what you think is best

from qnm.

Related Issues (20)

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.