Coder Social home page Coder Social logo

nvmfs's Introduction

NvmFs

Node Version Manager F#

Get the binaries at the releases tab

if you have the dotnet-sdk installed run dotnet tool install -g NvmFs

A Node version Manager Written in F#

This is probably the simplest Node Version Manager you'll find it doesn't have a lot of features and this is on purpose for more complete solutions please take a look at nvm, volta, nvm-windows.

Why would you want this?

If you want a dead simple node version manager this is for you.

Also, this tool is distributed in binary form as well as a dotnet tool so if you're running on CI with dotnet available and depend on installing a specific node version, perhaps this is the reason you may want it above the others.

Why would you not want this?

tl;dr: You need something else rather than just nvmfs install version or nvmfs use version

  • You need to run commands with different versions of node in the current shell without setting a global default like this.

  • You need to reinstall packages between versions like this

  • You need different architectures like this

Misc. Info

We don't handle existing node instalations outside the NVMFS_HOME directory

  • Windows

    • We use the user's system environment variables, if your powershell/cmd session is not recognizing node, then you need to close it and open it again, in the worst case you just need to log off and log in back to your account
    • we use cmd's mklink to create junctions on windows

    In versions lower than 0.6.0 we used to re-write the user's path but that also expanded any Environment variable that was part of the PATH, rather than doing that we now just add the NVMFS_HOME and NVMFS_NODE environment variables to the user's variables, it is up to you to add %NVMFS_NODE%% to the PATH variable

  • Unix

    • We append environment variables to the PATH using the ~/.bashrc
    • We use ln -s to create symlinks
    • We use unlink to remove symlinks
    • We use chmod +x to set execute permissions once we symlink the selected version

      Don't forget to call source ~/.bashrc to make your current terminal aware of the changes, other terminals will pick up those automatically

Customization

You can customize paths using the following environment variables

  • NVMFS_HOME - where is nvmfs going to download node versions, defaults to

    $"{Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)}/nvmfs"

    • C:\Users\username\AppData\Roaming\nvmfs on windows
    • /home/username/.config/nvmfs on linux/macos
  • NVMFS_NODE - symlinked location that will be added to the PATH

    • %%NVMFS_HOME%%\bin on windows
    • $NVMFS_HOME/bin on linux/macos
  • NVM_SOURCE_BASE_URL - the base url to get node distributions, (defaults to https://nodejs.org/dist)

nvmfs help

NvmFs 0.6.0
Copyright (C) 2020 Angel D. Munoz

  install      Installs the specified node version or the latest LTS by default

  use          Sets the Node Version

  list         Shows the available node versions

  uninstall    Uninstalls the specified node version

  help         Display more information on a specific command.

  version      Display version information.

nvmfs install --help

NvmFs 0.6.0
Copyright (C) 2020 Angel D. Munoz

  -n, --node       (Group: version) Installs the specified node version

  -l, --lts        (Group: version) Ignores version and pulls down the latest LTS version

  -c, --current    (Group: version) Ignores version and pulls down the latest Current version

  -d, --default    Sets the downloaded version as default (default: false)

  --help           Display this help screen.

  --version        Display version information.

nvmfs use --help

NvmFs 0.6.0
Copyright (C) 2020 Angel D. Munoz

  -n, --node       (Group: version) sets the specified node version in the PATH

  -l, --lts        (Group: version) Ignores version and sets the latest downloaded LTS version in the PATH

  -c, --current    (Group: version) Ignores version and sets the latest downloaded Current version in the PATH

  --help           Display this help screen.

  --version        Display version information.

nvmfs list --help

NvmFs 0.6.0
Copyright (C) 2020 Angel D. Munoz

  -r, --remote    Displays the last downloaded version index in the console

  -u, --update    Use together with --remote, pulls the version index from the node website

  --help          Display this help screen.

  --version       Display version information.

nvmfs uninstall --help

NvmFs 0.6.0
Copyright (C) 2020 Angel D. Munoz

  -n, --node    Required. Removes the specified node version

  --help        Display this help screen.

  --version     Display version information.

nvmfs's People

Contributors

angelmunoz avatar jordanmarr avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

Forkers

jordanmarr

nvmfs's Issues

nvmfs install fails on linux

If there is no .config directory in the user's home directory the installation will fail with a cryptic error

when running

nvmfs install --lts true -d true

doing

mkdir ~/.config -p
nvmfs install --lts true -d true
source ~/.bashrc

makes it work

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.