Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain .nvmrc better #1673

Merged
merged 1 commit into from
Dec 17, 2017
Merged

Explain .nvmrc better #1673

merged 1 commit into from
Dec 17, 2017

Conversation

p-salido
Copy link
Contributor

Alternative to #1581, though I would say nvm should strip whitespace from the version number in .nvmrc.

README.md Outdated
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).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't hard-wrap sentences; everything anybody uses to view text in the last decade or two has soft-wrapping :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except github diffs, terminals and text/plain rendering by browsers, to name the first three things that came to mind.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Terminals all can soft-wrap, as do github diffs (they omit the line number on soft-wrapped lines).

README.md Outdated
`.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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this is technically correct I don't think it is helping newcomers understand what goes into an nvmrc.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think newcomers will understand "specification" when it's not a term that's used anywhere else in docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to make any changes you want, I will not be offended.

@ljharb ljharb merged commit 9273f23 into nvm-sh:master Dec 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants