From 66f9271223c8f1d717eb97a9b14a50bbd51e6ad4 Mon Sep 17 00:00:00 2001 From: Valter Silva Date: Thu, 7 Mar 2024 07:23:18 +0000 Subject: [PATCH] feat: Add nvm.mk file with nvm installation and version management commands --- lib/make/nvm.mk | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/make/nvm.mk diff --git a/lib/make/nvm.mk b/lib/make/nvm.mk new file mode 100644 index 0000000..4f2766e --- /dev/null +++ b/lib/make/nvm.mk @@ -0,0 +1,16 @@ +NVM_VERSION ?= v0.39.3 + +.PHONY: nvm/install +## Install nvm +nvm/install: + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/$(NVM_VERSION)/install.sh | bash + +.PHONY: nvm/use +## Use a specific Node.js version +nvm/use: + nvm use $(version) + +.PHONY: nvm/list-versions +## List installed Node.js versions +nvm/list-versions: + nvm ls