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

Feature Request: nvm package.json field #2015

Closed
AndrewLeedham opened this issue Mar 10, 2019 · 2 comments
Closed

Feature Request: nvm package.json field #2015

AndrewLeedham opened this issue Mar 10, 2019 · 2 comments
Labels
feature requests I want a new feature in nvm!

Comments

@AndrewLeedham
Copy link

It would be nice if the .nvmrc file format could additionally be parsed from a package.json field. I have starting getting in to the habit of adding as many configuration files into package.json to avoid clutter in the root of projects.

Example:

// package.json
{
  "name": "project",
  // etc.
  "nvm": "10.14.1"
}
@ljharb
Copy link
Member

ljharb commented Mar 10, 2019

Parsing JSON in posix is prohibitively complex; it’s one of the reasons nvm doesn’t look at the engines field (see #651 / #1535).

In general, I’d suggest separate config files anyways - a cluttered root is far less problematic than a cluttered package.json :-)

@ljharb ljharb added the feature requests I want a new feature in nvm! label Mar 10, 2019
@AndrewLeedham
Copy link
Author

Parsing JSON in posix is prohibitively complex; it’s one of the reasons nvm doesn’t look at the engines field (see #651 / #1535).

In general, I’d suggest separate config files anyways - a cluttered root is far less problematic than a cluttered package.json :-)

Fair enough, wasn't familiar with how nvm was built :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature requests I want a new feature in nvm!
Projects
None yet
Development

No branches or pull requests

2 participants