-
-
Notifications
You must be signed in to change notification settings - Fork 750
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
"n use" style command for invoking npm #185
Comments
+1 This would be very useful. In its current incarnation, the results are weird. For example, this happened today: # From v0.10.29
brew upgrade node
...
node -v
v0.10.30
npm -v
1.4.23 Then check n # gets stuck in limbo b/c brew took over
n stable # Installs v0.10.30
node -v
v0.10.30
npm -v
1.4.23 Cool. Makes sense. But... n latest
node -v
v0.11.13
npm -v
1.4.9 :(. Switch back n stable
node -v
v0.10.30
npm -v
1.4.21 # F*ck Thus, every |
this is a great idea for running scripts as a certain version. progress? |
There is a sketch implementation of how this might work in #192 Usage:
Code: https://github.com/bitdivine/n This is not ready for merging into master but I find it useful to have a working implementation to play with to make sure that the feature implements all the goodies it promises. |
Do the above semantics work for you? They are:
If so I can make the implementation more robust and send you a pull request. |
I suggest following same syntax as
So running npm could look like:
|
This is not likely to make it to |
Prerelease available via |
Added |
n use <version>
runs node as a particular version. I think it'd be useful to also be able to run npm in this manner as well. The CLI could then look something like:$ n <version>
$ n <version> node
(or currently,$ n use <version>
)$ n <version> npm
The text was updated successfully, but these errors were encountered: