Repository navigation
Explain .nvmrc better - #1673
Conversation
| You can create a `.nvmrc` file containing version number in the project root directory (or any parent directory). | ||
| `nvm use`, `nvm install`, `nvm exec`, `nvm run`, and `nvm which` will all respect an `.nvmrc` file when a version is not supplied on the command line. | ||
| You can create a `.nvmrc` file containing node version number in the | ||
| project root directory (or any parent directory). |
There was a problem hiding this comment.
please don't hard-wrap sentences; everything anybody uses to view text in the last decade or two has soft-wrapping :-)
There was a problem hiding this comment.
Except github diffs, terminals and text/plain rendering by browsers, to name the first three things that came to mind.
There was a problem hiding this comment.
Terminals all can soft-wrap, as do github diffs (they omit the line number on soft-wrapped lines).
| `.nvmrc` being utilized. | ||
|
|
||
| The contents of a `.nvmrc` file **must** be the node version number | ||
| or specification followed by a newline. No trailing spaces are allowed |
There was a problem hiding this comment.
"or specification" isn't very clear; nvm --help describes it as a "version-ish"; another way to phrase it is "must be the exact argument passed to nvm use or other nvm commands, followed by a newline"
There was a problem hiding this comment.
While this is technically correct I don't think it is helping newcomers understand what goes into an nvmrc.
There was a problem hiding this comment.
Do you think newcomers will understand "specification" when it's not a term that's used anywhere else in docs?
There was a problem hiding this comment.
Feel free to make any changes you want, I will not be offended.
29b2c4d to
45a2c4c
Compare
Alternative to #1581, though I would say nvm should strip whitespace from the version number in .nvmrc.