Manage Node versions within Emacs
Add nvm to your Cask file:
(depends-on "nvm")Using use-package and straight.el
(use-package nvm
:straight (:host github :repo "rejeep/nvm.el")
:config
;; Optionally set a default node version
(nvm-use "18"))Using Quelpa
(use-package nvm
:quelpa ((nvm :fetcher github
:repo "rejeep/nvm.el")
:upgrade t)Use version. If callback is specified, use version in that
callback and then switch back to the previously used version.
Read version from .nvmrc in path (or default-directory) and use
that. Second callback argument is same as for nvm-use.
Call nvm-use-for on the file visited by the current buffer. Suitable
for use in a mode hook to automatically activate the correct node
version for a file.
Contribution is much welcome!
Install cask if you haven't already, then:
$ cd /path/to/nvm.el
$ cask
Run all tests with:
$ make