Specify Node Versions with .nvmrc

Date:


I’ve heavily promoted nvm, a Node.js version manager, over the years. Having a tool to manage multiple versions of a language interpreter has been so useful, especially due to the complexity of Node.js package management.

One tip I like to give new developers is adding a .nvmrc file to their repositories. The file contents is just a simple string representing the version of Node.js the project requires:

v16

A project with this .nvmrc is specifying that Node.js v16 should be used. Any developer could then run nvm use to download, install, and switch to that version. A nvm install call would then install dependencies in line with that version.

  • How to Create a Twitter Card
  • CSS @supports

    Feature detection via JavaScript is a client side best practice and for all the right reasons, but unfortunately that same functionality hasn’t been available within CSS.  What we end up doing is repeating the same properties multiple times with each browser prefix.  Yuck.  Another thing we…

  • Adding Events to Adding Events in MooTools

    Note: This post has been updated. One of my huge web peeves is when an element has click events attached to it but the element doesn’t sport the “pointer” cursor. I mean how the hell is the user supposed to know they can/should click on…

  • CSS Gradients

    With CSS border-radius, I showed you how CSS can bridge the gap between design and development by adding rounded corners to elements.  CSS gradients are another step in that direction.  Now that CSS gradients are supported in Internet Explorer 8+, Firefox, Safari, and Chrome…



Source link

Share post:

Subscribe

spot_imgspot_img

Popular

More like this
Related

Ford pausing construction of Michigan battery plant amid UAW strike, contract talks

DETROIT — Ford Motor Co. said Monday that...

Sony Xperia 5 V is now on sale

If you're old enough, you remember the times...

Wind Energy Could Get Safer for Bats with New Research

CLIMATEWIRE | Nearly a million bats are killed each...

I Never Thought I’d See the Day Jessie J Didn’t Have Jet-Black Hair — See Videos

Whenever I think of Jessie J, I immediately...