https://github.com/qwreey/fnvm
Make nvm MUCH faster in cygwin by hacking nvm
https://github.com/qwreey/fnvm
Last synced: about 1 year ago
JSON representation
Make nvm MUCH faster in cygwin by hacking nvm
- Host: GitHub
- URL: https://github.com/qwreey/fnvm
- Owner: qwreey
- Created: 2023-06-03T07:09:15.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-26T23:03:21.000Z (over 2 years ago)
- Last Synced: 2025-01-30T00:32:08.252Z (over 1 year ago)
- Language: Shell
- Size: 154 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What is fnvm?

wow nvm takes almost 2 seconds to initialize!
fnvm is some hacky method that makes nvm much faster in cygwin.
In cygwin, nvm makes bash slower. even it takes 2~10 second to initialize
fnvm using ~/.nvmrc.cached which created by user and contain cached node version to set PATH directly without calling nvm's version resolver which is very slow due to checking system installed nodejs and iojs, resolving all of installed nodes.
It also includes auto version changing when change cwd

# Installation
If nvm is not installed, install nvm first
```
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
```
Next, install fnvm
```
git clone https://github.com/qwreey75/fnvm.git ~/.fnvm --depth 1
source ~/.fnvm/fnvm.sh; FNVM_DIR=~/.fnvm fnvm_update
```
Done! If you want update fnvm, simply type `fnvm_update`
# Configure
you can insert these setting above `source $HOME/.nvm/fnvm/fnvm.sh; fnvm_init` in your rc file
```
export FNVM_DISABLE_CD="no" # If this value is "yes". auto version changing will be disabled
```
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# How much fast is?
In cygwin, Normal nvm takes ~2 second, but fnvm only takes 0.2 second! Almost ten times faster then normal nvm.
