Open stormbeta opened 8 years ago
Thoughts, @dansomething, @dwilson6, @joshuawarner32?
I have no overall objections.
A few comments:
Have you considered using n instead of nvm? It's less invasive; doesn't require any environment setup. But it might assume write access to /usr/local.
https://github.com/tj/n On Fri, Jan 22, 2016 at 3:45 PM Joshua Warner notifications@github.com wrote:
I have no overall objections.
A few comments:
- I'd rather not always install node per-project (at least not by default). What's the reasoning?
- Don't muck with my shell prompt (even though I'm using fish, and this likely won't affect me anyway)
— Reply to this email directly or view it on GitHub https://github.com/ReadyTalk/gradle-readytalk-js/issues/26#issuecomment-174078205 .
I'm with @joshuawarner32. I have no major concerns other than don't alter my shell prompt.
I'm not against using n
though I would really like the nodew script work on Windows for the times I need it.
Like the others have said, sounds good to me.
I had some time to look at this again, and put up a prototype static nvm wrapper here: https://github.com/stormbeta/nodew
@watsoncj You can use nvm without requiring environment setup - the above prototype works even if you don't have nvm installed.
@dansomething I agree about the Windows support, and that's unfortunately the main snag here since neither nvm
nor n
support windows (and the closest alternatives like nvm-windows require environment setup). As for the wrapper script, I can either generate a separate windows script like Gradle does, or look into syntax tricks to make a single polyglot.
I can live w/o the Windows support. I'll give the prototype a try.
As nvm is rapidly becoming the de facto version manager for node, the JS plugin should probably make use of it to better align with vanilla node.js development.
nodew
, setting it up as the canonical entry point for NodeExec tasksnodew
to make it obvious to the developer their PATH is altered.Going further, it might be interesting to look at adding some of this functionality to the upstream nvm project, in particular having it inject the project-local
node_modules/.bin
into the PATH as part ofnvm use
.