Giter Club home page Giter Club logo

Comments (7)

haishanh avatar haishanh commented on July 16, 2024 1

Yes! that would be better. 😀

I use tj/n before trying out fnm. You can almost do the same thing with n, see https://github.com/tj/n/blob/master/bin/n#L32

from fnm.

Schniz avatar Schniz commented on July 16, 2024 1

I generally agree about this, but I somehow liked the idea of making environment variables an internal implementation (since we already have a call that generates environment variables). It feels like a typed interface 😜

That being said, it can always be set manually (right after/before the fnm env), but co-locating it with the fnm env command makes it clear what is it for (and how to get information about it, using --help 😄)

from fnm.

Schniz avatar Schniz commented on July 16, 2024

Interesting: there's already #27, but that's not what you're talking about.
Looking for an existing archive feels like treating the symptom and not the actual problem we have:
I guess we can also support npm.taobao.org, only by changing the hard-coded https://nodejs.org to an environment variable.

Do you think it is a better fix for the problem? 😄

eval `fnm env --node-dist-url="https://npm.taobao.org/dist"`
# then everything as expected
fnm install v11.9.0

from fnm.

Schniz avatar Schniz commented on July 16, 2024

Amazing. Can you please edit the title of this issue then? Something like "Allow downloading versions from a Node.js mirror" 😄

from fnm.

haishanh avatar haishanh commented on July 16, 2024

Done. Thanks :)

from fnm.

haishanh avatar haishanh commented on July 16, 2024

Also, to keep it simple I don't think it's worth it to implement a new option (here --node-dist-url) for fnm env command. Reading an env var with a default value directly inside fnm is enough IMHO.

from fnm.

haishanh avatar haishanh commented on July 16, 2024

Yeah, that makes sense.

from fnm.

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.