As a developer I want to have multiple projects that can use different versions of NODE js. Also when I checkout new project from a GIT repository I ideally want to run just one command and all things would be automated.
Given that file .nvmrc allow for automatic switching of NODE versions per directory. And given that my project is built on top of that specific version of NODE and might not work in any other.
Should I commit it to GIT?
This might be opinion based question, but I am really asking on disadvantages of doing so. Are there any risks?
--
Background:
This was like my first commit, after I started working in the new company. My ex-colleague declined that PR (without previous debate), and when I asked, he told me that its a developer responsibility to use proper version.
Well I added .nvmrc to .gitignore and used it anyways. Otherwise I would need to type nvm use xx every time I opened a new window in terminal.
There is nothing inherently bad about specifying the version of your tool with which the project is being run (or for that matter, any project specific files as nicely discussed here), because:
.nvmrc).Plenty of people and many node projects commit their .nvmrc file.
I guess what your colleague meant is one of the following (just guessing):
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With