Last active
November 11, 2023 21:18
-
-
Save antoine-pous/a08710cc7fc63d98b130ed4f992e96ae to your computer and use it in GitHub Desktop.
Alias to work with nvm without cache conflict
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------------------------------------- | |
# "THE BEER-WARE LICENSE" (Revision 42): | |
# <[email protected]> wrote this file. As long as you retain this notice you | |
# can do whatever you want with this stuff. If we meet some day, and you think | |
# this stuff is worth it, you can buy me a beer in return Antoine POUS | |
# ---------------------------------------------------------------------------- | |
# Copy this content to your ~/.bashrc then run `source ~/.bashrc` | |
# Usage: nvu <version> [options] | |
# Example: nvu 6 | |
nvu() { | |
nvm install v$1 && nvm use v$@ && mkdir -p ~/.cache/node-$1 && npm config set cache ~/.cache/node-$1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment